Filter Menu
Filter menu allows user to filter the data in a table or a list.
#
#
#
#
The filter menu button (and icon button) can be disabled.
You can also disable individual filter menu options instead of the entire button.
#
#
- When user should be able to customize the data displayed in a table or a list.
#
- Use sentence case.
#
#
Root-level component for adding a menu.
All menu-related components must be children of FilterMenu.
| Name | Default | Description |
|---|---|---|
children | — | ReactNodeMenu button and list. |
#
Button for opening a menu.
| Name | Default | Description |
|---|---|---|
isLoading | — | booleanToggles the loading state. |
isDisabled | — | booleanToggles the disabled state. |
isJustified | — | booleanTake up an entire available container width. |
children | — | ReactNodeButton text. |
variant | "secondary" | "primary" | "secondary" | "tertiary" | "danger" | "warning" | "link"Button variant, which determines the purpose the button is used for and its appearance. |
size | — | "sm" | "md" | "lg" | "xl"Determines the height of the button. |
shape | "default" | "default" | "circle"Determines the shape of the button. |
icon | — | ComponentType<SVGAttributes<SVGElement>>Primary icon that's displayed on the left. Only `icon` or `imageUrl` can be set at the same time. |
directionIcon | — | ComponentType<SVGAttributes<SVGElement>>Icon for indicating the direction, displayed on the right side of the button. Used for icons like "arrow right" or "caret down". |
directionIconSize | — | IconProps["boxSize"]Override the default direction icon size. Use only when absolutely necessary, for components like `Menu` and `FilterMenu`. |
imageUrl | — | stringURL to an image to display on the left. Only `icon` or `imageUrl` can be set at the same time. |
#
Icon-only button for opening a menu.
| Name | Default | Description |
|---|---|---|
isLoading | false | booleanToggles the loading state. |
isDisabled | false | booleanToggles the disabled state. |
aria-label | — | stringButton's meaning for screen readers. |
icon | — | ComponentType<SVGAttributes<SVGElement>>Button icon. |
size | "md" | "2xs" | "xs" | "sm" | "md" | "lg"Determines the height of the button. |
shape | "default" | "default" | "circle"Determines the shape of the button |
variant | "tertiary" | "primary" | "secondary" | "tertiary" | "warning" | "danger"Button variant. |
#
Wrapper for groups.
| Name | Default | Description |
|---|---|---|
children | — | ReactNodeGroups. |
color | — | ColorThe CSS `color` property. |
textColor | — | ColorThe CSS `color` property. |
fill | — | ColorThe CSS `fill` property for icon SVGs and paths. |
stroke | — | ColorThe CSS `stroke` property for icon SVGs and paths. |
bg | — | ColorThe CSS `background` property. |
bgColor | — | ColorThe CSS `background-color` property. |
background | — | ColorThe CSS `background` property. |
backgroundColor | — | ColorThe CSS `background-color` property. |
borderColor | — | ColorThe CSS `border-color` property. |
borderTopColor | — | ColorThe CSS `border-top-color` property. |
borderBlockStartColor | — | ColorThe CSS `border-block-start-color` property. |
borderBottomColor | — | ColorThe CSS `border-bottom-color` property. |
borderBlockEndColor | — | ColorThe CSS `border-block-end-color` property. |
borderLeftColor | — | ColorThe CSS `border-left-color` property. |
borderInlineStartColor | — | ColorThe CSS `border-inline-start-color` property. |
borderRightColor | — | ColorThe CSS `border-right-color` property. |
borderInlineEndColor | — | ColorThe CSS `border-inline-end-color` property. |
surface | — | SurfaceExplicitly set the surface theme advertised to descendant form elements. Useful when `bg` is a value the surface resolver doesn't recognise – e.g. responsive object syntax, an arbitrary hex, or a token applied via `sx` instead of `bg`. |
#
Grouping of options.
#
Type: ReactNode
Options.
#
Type: string
Group title displayed above options.
#
Type: "radio" | "checkbox"
Selection type.
Use radio to allow a single option to be selected.
Use checkbox to allow multiple options to be selected.
#
Type: string | string[]
Selection.
When type is "radio", value is always a string.
When type is "checkbox", value is always an array of strings.
#
Type: ((value: string) => void) | (value: string[]) => void)
Callback for when user selects a single or multiple options, depending on the type prop.
When type is "radio", value is always a string.
When type is "checkbox", value is always an array of strings.
#
| Name | Default | Description |
|---|---|---|
isDisabled | — | booleanDetermines if option is disabled. |
children | — | ReactNodeOption text. |
value | — | stringOption value. Used to identify this option in a selection. |