Skip to Content
Referencefusion-uiComponentsFormsOption

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

NameTypeRequiredDecription
valuestringtrueThe value of the option.
titleTextfalseDisplay text for the option.
subtitleTextfalseSecondary text for the option.
leadingReactNodefalseElement displayed at the start of the option.
trailingReactNodefalseElement displayed at the end of the option.
isSelectedbooleantrueWhether the option is selected.
onSelect(value: string | null) => voidfalseCallback function when the option is selected.
scorenumberfalseThe score of the option.
matchesstring[]falseThe matches of the option.
Last updated on