Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Native Select

    The browser's own select, dressed as a Nelumbo field. It has the same surface, height, chevron and focus line as Select, but the list is drawn by the platform: the wheel on iOS, the sheet on Android, the keyboard and type-ahead you already know on desktop.

    Install

    npx shadcn@latest add @nelumbo/native-select

    With a label

    The label is always raised, because a select always shows a value. Start with a disabled empty option as the placeholder. Filled and outlined, like Input.

    Used to work out tax.

    Sizes

    default 56px, sm 48px, xs 36px. Without a floating label (xs, or no label) pass an aria-label or label so it has a name.

    Invalid and disabled

    Pick a time zone to schedule the call.

    Native Select or Select?

    Both look like the same field. They differ in what opens.

    Native Select

    • Phones and tablets: the system picker, with the right touch size and no scroll traps.
    • Forms posted to a server or filled by password managers and autofill (country, state, time zone).
    • Long lists such as 200 countries: type-ahead and platform scrolling for free.
    • Plain text options only; the browser draws them, so no icons, descriptions or custom rows.

    Select

    • Desktop UIs where the list should match the rest of the design.
    • Options with icons, descriptions or a check mark on the chosen row.
    • Short lists where the spring animation and the raised pill feel good.
    • When you need to control the list's width, position or contents.

    Usage

    import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "@/components/ui/native-select"​// shadcn's API, unchanged<NativeSelect>  <NativeSelectOption value="">Select status</NativeSelectOption>  <NativeSelectOption value="todo">Todo</NativeSelectOption></NativeSelect>​// Nelumbo: floating label, help and error text<NativeSelect label="Country" description="Used for tax." defaultValue="">  <NativeSelectOption value="" disabled>Choose a country</NativeSelectOption>  <NativeSelectOptGroup label="Europe">    <NativeSelectOption value="de">Germany</NativeSelectOption>  </NativeSelectOptGroup></NativeSelect>

    Props

    PropTypeDefaultNotes
    labelstringFloating label (always raised). Names the control; sr-only at size xs
    variant"filled" | "outlined""filled"Same as Input
    size"default" | "sm" | "xs""default"56px, 48px, 36px. shadcn's sm still means smaller
    iconIconNameLeading Material Symbol
    descriptionReactNodeHelp text under the field
    errorReactNode | booleanMarks invalid; a string replaces the description
    classNamestringOn the field wrapper (set the width here)
    ...propsselect propsvalue, defaultValue, onChange, name, required, aria-*; ref points at the select