Select

Select Component

A Select component that allows users to choose from a list of options.


Installation

npx react-nex add Select

Example

Search with Select

Search and Choose a technology


Props

onSelect

  • Type: (value: string) => void
  • Description: Callback function that is called when an option is selected. The selected value is passed as a string.

value

  • Type: string
  • Description: The currently selected value. This should be a string matching one of the option values.

children

  • Type: node
  • Description: The list of options to choose from, wrapped in a SelectList component.