appica-dev

Select

Component

About

A dropdown select control with a styled trigger and popup listbox for choosing one or multiple options from a list.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Select to your project and fits it to your theme.

Code

How Select is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
  Select,
  SelectTrigger,
  SelectValue,
  SelectContent,
  SelectGroup,
  SelectGroupLabel,
  SelectItem,
  SelectSeparator,
} from "@/components/ui/select";

export default function SelectGrouped() {
  return (
    <div className="w-full max-w-70">
      <Select>
        <SelectTrigger aria-label="Pick a food">
          <SelectValue placeholder="Pick a food" />
        </SelectTrigger>
        <SelectContent>
          <SelectGroup>
            <SelectGroupLabel>Fruits</SelectGroupLabel>
            <SelectItem value="Apple">Apple</SelectItem>
            <SelectItem value="Banana">Banana</SelectItem>
            <SelectItem value="Orange">Orange</SelectItem>
            <SelectItem value="Strawberry">Strawberry</SelectItem>
          </SelectGroup>
          <SelectSeparator />
          <SelectGroup>
            <SelectGroupLabel>Vegetables</SelectGroupLabel>
            <SelectItem value="Carrot">Carrot</SelectItem>
            <SelectItem value="Potato">Potato</SelectItem>
            <SelectItem value="Tomato">Tomato</SelectItem>
            <SelectItem value="Broccoli" disabled>
              Broccoli
            </SelectItem>
          </SelectGroup>
        </SelectContent>
      </Select>
    </div>
  );
}

Dependencies

More by appica-dev

View all
  • Border Beam

    Border Beam

    63
  • Text Animate

    Text Animate

    21
  • Carousel

    Carousel

    19
  • Avatar

    Avatar

    15
  • Sparkline

    Sparkline

    8
  • Table of Contents

    Table of Contents

    7
  • Background Pattern

    Background Pattern

    7
  • Color Area

    Color Area

    6