native-select
agentmesh/native-selectFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/native-select.jsonSource
1import * as React from "react"23import { cn } from "@/registry/base-vega/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="h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-8 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"28 {...props}29 />30 <IconPlaceholder31 lucide="ChevronDownIcon"32 tabler="IconSelector"33 hugeicons="UnfoldMoreIcon"34 phosphor="CaretDownIcon"35 remixicon="RiArrowDownSLine"36 className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none"37 aria-hidden="true"38 data-slot="native-select-icon"39 />40 </div>41 )42}4344function NativeSelectOption({45 className,46 ...props47}: React.ComponentProps<"option">) {48 return (49 <option50 data-slot="native-select-option"51 className={cn("bg-[Canvas] text-[CanvasText]", className)}52 {...props}53 />54 )55}5657function NativeSelectOptGroup({58 className,59 ...props60}: React.ComponentProps<"optgroup">) {61 return (62 <optgroup63 data-slot="native-select-optgroup"64 className={cn("bg-[Canvas] text-[CanvasText]", className)}65 {...props}66 />67 )68}6970export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
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 |
