Guaxu Docs
    Preparing search index...

    Function Select

    • Parameters

      Returns Element

      A dropdown select component. It handles accessibility, open/close state, and option rendering. The children prop is a render‑prop that allows customizing the display of each option; use it together with SelectOption.

      <Select
      label="Choose a fruit"
      value={selected}
      setValue={setSelected}
      options={[
      { value: 'apple', children: 'Apple' },
      { value: 'banana', children: 'Banana' },
      ]}
      placeholder="Select an option"
      >
      {item => <SelectOption value={item.value}>{item.children}</SelectOption>}
      </Select>