bearnie

Select

Dropdown for selecting one option.

Installation

npx bearnie add select
npx bearnie add select

Usage

import { Select } from "@/components/bearnie/select"
<Select placeholder="Select an option">
  <option value="one">Option One</option>
  <option value="two">Option Two</option>
</Select>

Examples

With label

Disabled

Grouped options

Anatomy

  • Select - The dropdown container with native options
  • SelectGroup - Native optgroup wrapper for related options

Props

Select

PropTypeDefaultDescription
idstring-Element ID for label association
namestring-Form field name
placeholderstring-Placeholder option text
disabledbooleanfalseDisables the select
requiredbooleanfalseMakes selection required
classstring-Additional CSS classes