Option
The Option component is used to render each option in the Select component. It supports features like search, custom option rendering, and integration with icons and other UI elements.
Usage
The Option component is typically not used directly, as it is used internally by the Select component. However, it is exported from the @codedazur/fusion-ui package and can be used as a starting point for creating custom option components, or to override the default option rendering.
Reference
OptionProps
| Name | Type | Required | Decription |
|---|---|---|---|
value | string | true | The value of the option. |
title | Text | false | Display text for the option. |
subtitle | Text | false | Secondary text for the option. |
leading | ReactNode | false | Element displayed at the start of the option. |
trailing | ReactNode | false | Element displayed at the end of the option. |
isSelected | boolean | true | Whether the option is selected. |
onSelect | (value: string | null) => void | false | Callback function when the option is selected. |
score | number | false | The score of the option. |
matches | string[] | false | The matches of the option. |
Last updated on