BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/native-select

native-select

draco-china-github/native-select
FreeComponent

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/native-select.json

Source

registry/radix-sera/ui/native-select.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/native-select.json
1import * as React from "react"
2
3import { cn } from "@/registry/radix-sera/lib/utils"
4import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
5
6type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
7 size?: "sm" | "default"
8}
9
10function NativeSelect({
11 className,
12 size = "default",
13 ...props
14}: NativeSelectProps) {
15 return (
16 <div
17 className={cn(
18 "group/native-select relative w-fit has-[select:disabled]:opacity-50",
19 className
20 )}
21 data-slot="native-select-wrapper"
22 data-size={size}
23 >
24 <select
25 data-slot="native-select"
26 data-size={size}
27 className="h-10 w-full min-w-0 appearance-none rounded-none border border-transparent border-b-input bg-transparent py-2 pr-8 pl-0 text-sm transition-[color,border-color] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-b-ring disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-b-destructive data-[size=sm]:h-9 dark:aria-invalid:border-b-destructive/50"
28 {...props}
29 />
30 <IconPlaceholder
31 lucide="ChevronDownIcon"
32 tabler="IconSelector"
33 hugeicons="UnfoldMoreIcon"
34 phosphor="CaretDownIcon"
35 remixicon="RiArrowDownSLine"
36 className="pointer-events-none absolute top-1/2 right-0 size-3.5 -translate-y-1/2 text-muted-foreground select-none"
37 aria-hidden="true"
38 data-slot="native-select-icon"
39 />
40 </div>
41 )
42}
43
44function NativeSelectOption({
45 className,
46 ...props
47}: React.ComponentProps<"option">) {
48 return (
49 <option
50 data-slot="native-select-option"
51 className={cn("bg-[Canvas] text-[CanvasText]", className)}
52 {...props}
53 />
54 )
55}
56
57function NativeSelectOptGroup({
58 className,
59 ...props
60}: React.ComponentProps<"optgroup">) {
61 return (
62 <optgroup
63 data-slot="native-select-optgroup"
64 className={cn("bg-[Canvas] text-[CanvasText]", className)}
65 {...props}
66 />
67 )
68}
69
70export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }

Files it writes

  • registry/radix-sera/ui/native-select.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

draco-china.github.io draco-china/shadcn-pro on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alertalertshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex