native-select
agileflow-projectquestorg/native-selectFreeComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/native-select.jsonSource
1import * as React from "react"23import { cn } from "@/registry/bases/radix/lib/utils"4import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"56type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {7 size?: "sm" | "default"8}910function NativeSelect({11 className,12 size = "default",13 ...props14}: NativeSelectProps) {15 return (16 <div17 className={cn(18 "group/native-select relative w-fit has-[select:disabled]:opacity-50",19 className20 )}21 data-slot="native-select-wrapper"22 data-size={size}23 >24 <select25 data-slot="native-select"26 data-size={size}27 className="border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 outline-none disabled:pointer-events-none disabled:cursor-not-allowed"28 {...props}29 />30 <IconPlaceholder31 lucide="ChevronDownIcon"32 tabler="IconSelector"33 hugeicons="UnfoldMoreIcon"34 phosphor="CaretDownIcon"35 className="text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none"36 aria-hidden="true"37 data-slot="native-select-icon"38 />39 </div>40 )41}4243function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {44 return <option data-slot="native-select-option" {...props} />45}4647function NativeSelectOptGroup({48 className,49 ...props50}: React.ComponentProps<"optgroup">) {51 return (52 <optgroup53 data-slot="native-select-optgroup"54 className={cn(className)}55 {...props}56 />57 )58}5960export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
Files it writes
More from shadcn/ui
All 133 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 |
