Home / File/ native-select.tsx — ui Source File

native-select.tsx — ui Source File

Architecture documentation for native-select.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 3 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  c8e37a28_0a4b_7270_30b2_898c0257b270["native-select.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  c8e37a28_0a4b_7270_30b2_898c0257b270 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6["utils"]
  c8e37a28_0a4b_7270_30b2_898c0257b270 --> ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  c8e37a28_0a4b_7270_30b2_898c0257b270 --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style c8e37a28_0a4b_7270_30b2_898c0257b270 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as React from "react"

import { cn } from "@/registry/bases/radix/lib/utils"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
  size?: "sm" | "default"
}

function NativeSelect({
  className,
  size = "default",
  ...props
}: NativeSelectProps) {
  return (
    <div
      className={cn(
        "cn-native-select-wrapper 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="cn-native-select outline-none disabled:pointer-events-none disabled:cursor-not-allowed"
        {...props}
      />
      <IconPlaceholder
        lucide="ChevronDownIcon"
        tabler="IconSelector"
        hugeicons="UnfoldMoreIcon"
        phosphor="CaretDownIcon"
        remixicon="RiArrowDownSLine"
        className="cn-native-select-icon pointer-events-none absolute 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 }

Subdomains

Dependencies

  • icon-placeholder
  • react
  • utils

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 ComponentRegistry domain, ChartRegistry 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): icon-placeholder, react, utils.
Where is native-select.tsx in the architecture?
native-select.tsx is located at apps/v4/registry/bases/radix/ui/native-select.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/ui).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free