select
yyc3-knowledge-base/selectUnverifiedComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/YYC-Cube/YYC3-Knowledge-Base/main/YYC3-D/ui/apps/v4/select.jsonSource
1"use client"23import * as React from "react"4import * as SelectPrimitive from "@radix-ui/react-select"5import { Check, ChevronDown, ChevronUp } from "lucide-react"67import { cn } from "@/lib/utils"89const Select = SelectPrimitive.Root1011const SelectGroup = SelectPrimitive.Group1213const SelectValue = SelectPrimitive.Value1415const SelectTrigger = React.forwardRef<16 React.ElementRef<typeof SelectPrimitive.Trigger>,17 React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>18>(({ className, children, ...props }, ref) => (19 <SelectPrimitive.Trigger20 ref={ref}21 className={cn(22 "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",23 className24 )}25 {...props}26 >27 {children}28 <SelectPrimitive.Icon asChild>29 <ChevronDown className="h-4 w-4 opacity-50" />30 </SelectPrimitive.Icon>31 </SelectPrimitive.Trigger>32))33SelectTrigger.displayName = SelectPrimitive.Trigger.displayName3435const SelectScrollUpButton = React.forwardRef<36 React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,37 React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>38>(({ className, ...props }, ref) => (39 <SelectPrimitive.ScrollUpButton40 ref={ref}41 className={cn(42 "flex cursor-default items-center justify-center py-1",43 className44 )}45 {...props}46 >47 <ChevronUp className="h-4 w-4" />48 </SelectPrimitive.ScrollUpButton>49))50SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName5152const SelectScrollDownButton = React.forwardRef<53 React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,54 React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>55>(({ className, ...props }, ref) => (56 <SelectPrimitive.ScrollDownButton57 ref={ref}58 className={cn(59 "flex cursor-default items-center justify-center py-1",60 className61 )}62 {...props}63 >64 <ChevronDown className="h-4 w-4" />65 </SelectPrimitive.ScrollDownButton>66))67SelectScrollDownButton.displayName =68 SelectPrimitive.ScrollDownButton.displayName6970const SelectContent = React.forwardRef<71 React.ElementRef<typeof SelectPrimitive.Content>,72 React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>73// … truncated
What it pulls in
npm packages
Files it writes
More from shadcn/ui
All 411 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Unverified | 1 dep | |
| alertalert | shadcn/ui | Components | Unverified | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Unverified | 1 dep | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Unverified | 1 dep | |
| avataravatar | shadcn/ui | Components | Unverified | 1 dep | |
| badgebadge | shadcn/ui | Components | Unverified | 1 dep | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Unverified | 1 dep | |
| buttonbutton | shadcn/ui | Components | Unverified | 1 dep |
