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/selectUsage
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
valueThe selected value, when controlled.
string
defaultValueThe value that starts selected, when uncontrolled.
string
onValueChangeCalled with the new value when the selection changes.
(value: string) => void
sizeThe trigger's height: 32px for sm, 36px for default. Goes on SelectTrigger.
"sm" | "default" = "default"
Released under the MIT License.
More components
- PopoverA frosted panel that scales in from its trigger and animates out before it closes.
- Date PickerA date field that opens a calendar. Months slide in the direction you page, and arrow keys move between days.
- Password InputA password field with a button that shows or hides what you typed. The eye icon swaps with a quick pop.
- Code InputOne box per digit for verification codes, with a blinking caret in the next box. Pasting a code and autofill from SMS both work.
See them in a real app
These components come from Mochi, our admin dashboard template built with Next.js, shadcn/ui and Motion.