HelpTribe.

Select

Native dropdown select input. Supports placeholders, error states, and custom styling consistent with the design system.

Installation

$ npx shadcn@latest add select

Preview

Usage (React/TSX)

import { Select } from "@/components/ui/select"
import { Label } from "@/components/ui/input"

export default function FilterForm() {
  return (
    <div className="space-y-3">
      <Label>Region</Label>
      <Select placeholder="Select region">
        <option value="eu">Europe</option>
        <option value="na">North America</option>
        <option value="me">Middle East</option>
      </Select>
    </div>
  )
}

Props

PropTypeDefaultDescription
errorbooleanfalseShows error state with red border.
placeholderstringβ€”Placeholder text for the first disabled option.
disabledbooleanfalseDisables the select.
classNamestringβ€”Additional CSS classes to apply.
childrenReactNodeβ€”Option elements inside the select.