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,
  SelectItem,
} from "@/components/ui/select";

const fruits = [
  "Apple",
  "Banana",
  "Blueberry",
  "Grapes",
  "Orange",
  "Strawberry",
];
const variants = ["outline", "soft"] as const;

export default function SelectVariants() {
  return (
    <div className="flex w-full max-w-70 flex-col gap-4">
      {variants.map((variant) => (
        <Select key={variant} variant={variant}>
          <SelectTrigger aria-label={`Pick a fruit (${variant})`}>
            <SelectValue placeholder="Pick a fruit" />
          </SelectTrigger>
          <SelectContent>
            {fruits.map((fruit) => (
              <SelectItem key={fruit} value={fruit}>
                {fruit}
              </SelectItem>
            ))}
          </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