All components
Chewypixel component

Select

A select whose list pops open on a frosted panel, with a soft halo on the trigger while it's open.

Installation

npx shadcn@latest add @chewypixel/select

Usage

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

export function FlavorSelect() {
  return (
    <Select defaultValue="cherry">
      <SelectTrigger className="w-48" aria-label="Flavor">
        <SelectValue placeholder="Pick a flavor" />
      </SelectTrigger>
      <SelectContent>
        <SelectItem value="cherry">Cherry</SelectItem>
        <SelectItem value="lemon">Lemon</SelectItem>
        <SelectItem value="grape">Grape</SelectItem>
      </SelectContent>
    </Select>
  );
}

Props

value

The selected value, when controlled.

string

defaultValue

The value that starts selected, when uncontrolled.

string

onValueChange

Called with the new value when the selection changes.

(value: string) => void

size

The trigger's height: 32px for sm, 36px for default. Goes on SelectTrigger.

"sm" | "default" = "default"

Released under the MIT License.

More components

See them in a real app

These components come from Mochi, our admin dashboard template built with Next.js, shadcn/ui and Motion.