select
nrjdalal/selectFreeComponent
acme publishes no description for this item.
Install it
npx shadcn@latest add https://nrjdalal.dev/r/select.jsonSource
1"use client"23import { cn } from "@/lib/utils"4import * as SelectPrimitive from "@radix-ui/react-select"5import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"6import * as React from "react"78function Select({9 ...props10}: React.ComponentProps<typeof SelectPrimitive.Root>) {11 return <SelectPrimitive.Root data-slot="select" {...props} />12}1314function SelectGroup({15 ...props16}: React.ComponentProps<typeof SelectPrimitive.Group>) {17 return <SelectPrimitive.Group data-slot="select-group" {...props} />18}1920function SelectValue({21 ...props22}: React.ComponentProps<typeof SelectPrimitive.Value>) {23 return <SelectPrimitive.Value data-slot="select-value" {...props} />24}2526function SelectTrigger({27 className,28 children,29 ...props30}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {31 return (32 <SelectPrimitive.Trigger33 data-slot="select-trigger"34 className={cn(35 "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",36 className,37 )}38 {...props}39 >40 {children}41 <SelectPrimitive.Icon asChild>42 <ChevronDownIcon className="size-4 opacity-50" />43 </SelectPrimitive.Icon>44 </SelectPrimitive.Trigger>45 )46}4748function SelectContent({49 className,50 children,51 position = "popper",52 ...props53}: React.ComponentProps<typeof SelectPrimitive.Content>) {54 return (55 <SelectPrimitive.Portal>56 <SelectPrimitive.Content57 data-slot="select-content"58 className={cn(59// … truncated
What it pulls in
npm packages
Files it writes
More from acme
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | acme | Components | Free | 5 deps · 2 files | |
| alertalert | acme | Components | Free | 4 deps · 2 files | |
| alert-dialogalert-dialog | acme | Components | Free | 6 deps · 3 files | |
| aspect-ratioaspect-ratio | acme | Components | Free | 1 dep | |
| avataravatar | acme | Components | Free | 4 deps · 2 files | |
| badgebadge | acme | Components | Free | 5 deps · 2 files | |
| breadcrumbbreadcrumb | acme | Components | Free | 5 deps · 2 files | |
| buttonbutton | acme | Components | Free | 5 deps · 2 files |
