select
lyse/selectFreeComponent
lyse publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by lyse on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.getlyse.com/r/select.jsonSource
1import * as React from "react"2import * as SelectPrimitive from "@radix-ui/react-select"3import { cva, type VariantProps } from "class-variance-authority"4import { Check, ChevronDown } from "lucide-react"56import { cn } from "@/lib/utils"7import "./select.css"89/* ------------------------------------------------------------------ */10/* CVA */11/* ------------------------------------------------------------------ */1213const selectTriggerVariants = cva(14 "select-trigger inline-flex items-center justify-between gap-[var(--layout-gap-md)] rounded-[var(--layout-radius-lg)] px-[var(--layout-padding-md)] text-content-note font-accent",15 {16 variants: {17 variant: {18 default: "",19 destructive: "select-trigger-destructive",20 success: "select-trigger-success",21 },22 size: {23 sm: "h-[var(--layout-size-lg)]",24 md: "h-9",25 lg: "h-[var(--layout-size-xl)]",26 },27 },28 defaultVariants: {29 variant: "default",30 size: "md",31 },32 }33)3435/* ------------------------------------------------------------------ */36/* Select */37/* ------------------------------------------------------------------ */3839function Select({40 ...props41}: React.ComponentProps<typeof SelectPrimitive.Root>) {42 return <SelectPrimitive.Root {...props} />43}4445/* ------------------------------------------------------------------ */46/* SelectGroup */47/* ------------------------------------------------------------------ */4849function SelectGroup({50 ...props51}: React.ComponentProps<typeof SelectPrimitive.Group>) {52 return <SelectPrimitive.Group data-slot="select-group" {...props} />53}5455/* ------------------------------------------------------------------ */56/* SelectValue */57/* ------------------------------------------------------------------ */5859function SelectValue({60 ...props61}: React.ComponentProps<typeof SelectPrimitive.Value>) {62 return <SelectPrimitive.Value data-slot="select-value" {...props} />63}6465/* ------------------------------------------------------------------ */66/* SelectTrigger */67/* ------------------------------------------------------------------ */6869function SelectTrigger({70 className,71 variant,72 size,73 children,74 ...props75// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from lyse
All 33 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| action-cardaction-card | lyse | Components | Free | no deps · 2 files | |
| alertalert | lyse | Components | Free | 2 deps · 2 files | |
| alert-dialogalert-dialog | lyse | Components | Free | 2 deps · 2 files | |
| avataravatar | lyse | Components | Free | 3 deps · 2 files | |
| badgebadge | lyse | Components | Free | 1 dep · 2 files | |
| banner-infobanner-info | lyse | Components | Free | 2 deps · 2 files | |
| breadcrumbbreadcrumb | lyse | Components | Free | 2 deps · 2 files | |
| buttonbutton | lyse | Components | Free | 2 deps · 2 files |
