A table column header that sorts. Announces the column and its current sort direction to screen readers.
Health
Source
Playground
No Example
Accessibility
unknown
Platform
Universal
Contrib Component
SortableColumnHeader is a community contributed component. We encourage its usage but it might not give the same level of robustness (accessibility, tests, ...) than core Murray components.- Overview
- Props
SortableColumnHeader
The SortableColumnHeader component is available for universal (web and mobile) applications.
Overview
See the component source code for API details and examples.
tip
This component is universal, its usage is the same on web and mobile.
SortableColumnHeader props
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| children* | ReactNode | The content to display in the button | ||
| color | 4 possibilitiesundefined`$${string}`Variable<any>OpaqueColorValue | $grey700 | The color of the text | |
| columnLabel* | string | The localized name of the column to be sorted Used for accessibility and display purposes | ||
| onPress | (() => void)undefined | Callback when the button is pressed | ||
| size | 8 possibilitiesundefinednumber"$text100""$text200""$text300""$text400""$text500"Variable<any> | $text100 | The size of the text | |
| sortDirection* | SortDirection | The current sort direction Used to determine the caret icon state | ||
| transform | 6 possibilities"none""capitalize""uppercase""lowercase""unset"undefined | The text transform Pass "uppercase" to match the column heads Murray's own Table renders | ||
| weight | TextWeightundefined | The weight of the text Pass "medium" to match the column heads Murray's own Table renders |