select
draco-china-github/selectFreeComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/select.jsonSource
1"use client"23import * as React from "react"4import { Select as SelectPrimitive } from "radix-ui"56import { cn } from "@/registry/radix-sera/lib/utils"7import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"89function Select({10 ...props11}: React.ComponentProps<typeof SelectPrimitive.Root>) {12 return <SelectPrimitive.Root data-slot="select" {...props} />13}1415function SelectGroup({16 className,17 ...props18}: React.ComponentProps<typeof SelectPrimitive.Group>) {19 return (20 <SelectPrimitive.Group21 data-slot="select-group"22 className={cn("scroll-my-1.5 p-1.5", className)}23 {...props}24 />25 )26}2728function SelectValue({29 ...props30}: React.ComponentProps<typeof SelectPrimitive.Value>) {31 return <SelectPrimitive.Value data-slot="select-value" {...props} />32}3334function SelectTrigger({35 className,36 size = "default",37 children,38 ...props39}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {40 size?: "sm" | "default"41}) {42 return (43 <SelectPrimitive.Trigger44 data-slot="select-trigger"45 data-size={size}46 className={cn(47 "flex w-fit items-center justify-between gap-1.5 rounded-none border border-transparent border-b-input bg-transparent px-0 py-2 text-sm whitespace-nowrap transition-[color,border-color] outline-none focus-visible:border-b-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-b-destructive data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-9 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-b-destructive/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",48 className49 )}50 {...props}51 >52 {children}53 <SelectPrimitive.Icon asChild>54 <IconPlaceholder55 lucide="ChevronDownIcon"56 tabler="IconSelector"57 hugeicons="UnfoldMoreIcon"58 phosphor="CaretDownIcon"59 remixicon="RiArrowDownSLine"60 className="pointer-events-none size-3.5 text-muted-foreground"61 />62 </SelectPrimitive.Icon>63 </SelectPrimitive.Trigger>64 )65}6667function SelectContent({68 className,69 children,70 position = "item-aligned",71 align = "center",72 ...props73}: React.ComponentProps<typeof SelectPrimitive.Content>) {74 return (75 <SelectPrimitive.Portal>76 <SelectPrimitive.Content77// … truncated
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
