Filter
Filter is a component that creates a set of radio buttons for filtering content.
It provides a clean interface for users to select from multiple options with optional reset functionality.
Filter is a component that creates a set of radio buttons for filtering content.
It provides a clean interface for users to select from multiple options with optional reset functionality.
Filter is a standalone component.
The Filter component creates a set of radio buttons for filtering content. It provides a clean interface for users to select from multiple options with optional reset functionality.
| Filter Props | Type | Description |
|---|---|---|
is | string | Allows changing the element tag. Default is |
name | string | The name attribute for the radio button group. Required for proper radio button functionality. |
items | array
| An array of items to display as filter options. Each item can be either a string or an object with |
modelValue | any | |
resetLabel | string | The label for the reset button. Default is |
position | string | Controls the position of the reset button. Options: - |
| start | boolean | Set position to start |
| end | boolean | Set position to end |
color | string | The color of the filter buttons. Default is |
| neutral | boolean | Sets color to neutral |
| primary | boolean | Sets color to primary |
| secondary | boolean | Sets color to secondary |
| accent | boolean | Sets color to accent |
| info | boolean | Sets color to info |
| success | boolean | Sets color to success |
| warning | boolean | Sets color to error |
size | string | The size of the filter buttons. Options: - |
| xl | boolean | Set size to xl |
| lg | boolean | Set size to lg |
| md | boolean | Set size to md |
| sm | boolean | Set size to sm |
| xs | boolean | Set size to xs |
| Filter Events | Arguments | Description |
|---|---|---|
update:modelValue |
| Filter Slots | Description |
|---|---|
default | Optional slot for adding custom filter items. |
Below are additional usage examples for the Filter component. For basic usage, see the intro.
Shows the resetLabel and position props to customize the reset button.
Color all buttons with the color prop.
Set the size of the buttons with the size prop.