native-select.tsx — ui Source File
Architecture documentation for native-select.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 778e52dc_af54_ab5d_69e3_65867007fc1d["native-select.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 778e52dc_af54_ab5d_69e3_65867007fc1d --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3d9438e8_7604_787c_4898_907262aff28b["utils"] 778e52dc_af54_ab5d_69e3_65867007fc1d --> 3d9438e8_7604_787c_4898_907262aff28b d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 778e52dc_af54_ab5d_69e3_65867007fc1d --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 style 778e52dc_af54_ab5d_69e3_65867007fc1d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import { cn } from "@/examples/base/lib/utils"
import { ChevronDownIcon } from "lucide-react"
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
size?: "sm" | "default"
}
function NativeSelect({
className,
size = "default",
...props
}: NativeSelectProps) {
return (
<div
className={cn(
"group/native-select relative w-fit has-[select:disabled]:opacity-50",
className
)}
data-slot="native-select-wrapper"
data-size={size}
>
<select
data-slot="native-select"
data-size={size}
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 ps-2.5 pe-8 text-sm transition-colors outline-none select-none focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:ring-3 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5"
{...props}
/>
<ChevronDownIcon
className="text-muted-foreground pointer-events-none absolute end-2.5 top-1/2 size-4 -translate-y-1/2 select-none"
aria-hidden="true"
data-slot="native-select-icon"
/>
</div>
)
}
function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {
return <option data-slot="native-select-option" {...props} />
}
function NativeSelectOptGroup({
className,
...props
}: React.ComponentProps<"optgroup">) {
return (
<optgroup
data-slot="native-select-optgroup"
className={cn(className)}
{...props}
/>
)
}
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
Domain
Subdomains
Types
Dependencies
- lucide-react
- react
- utils
Source
Frequently Asked Questions
What does native-select.tsx do?
native-select.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in native-select.tsx?
native-select.tsx defines 3 function(s): NativeSelect, NativeSelectOptGroup, NativeSelectOption.
What does native-select.tsx depend on?
native-select.tsx imports 3 module(s): lucide-react, react, utils.
Where is native-select.tsx in the architecture?
native-select.tsx is located at apps/v4/examples/base/ui-rtl/native-select.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/base/ui-rtl).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free