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

native-select-example.tsx — ui Source File

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

File tsx ComponentRegistry UIPrimitives 3 imports 7 functions

Entity Profile

Dependency Diagram

graph LR
  616367e3_99c0_63d0_bcec_0471926df45a["native-select-example.tsx"]
  f56be340_a522_c6f7_dec3_5906873d14c8["example"]
  616367e3_99c0_63d0_bcec_0471926df45a --> f56be340_a522_c6f7_dec3_5906873d14c8
  8a527dea_9425_3da4_8ceb_ec3058568dc9["field"]
  616367e3_99c0_63d0_bcec_0471926df45a --> 8a527dea_9425_3da4_8ceb_ec3058568dc9
  d7a81682_7939_efa1_2cb0_ffb907cbcb71["native-select"]
  616367e3_99c0_63d0_bcec_0471926df45a --> d7a81682_7939_efa1_2cb0_ffb907cbcb71
  style 616367e3_99c0_63d0_bcec_0471926df45a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/base/components/example"
import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@/registry/bases/base/ui/field"
import {
  NativeSelect,
  NativeSelectOptGroup,
  NativeSelectOption,
} from "@/registry/bases/base/ui/native-select"

export default function NativeSelectExample() {
  return (
    <ExampleWrapper>
      <NativeSelectBasic />
      <NativeSelectWithGroups />
      <NativeSelectSizes />
      <NativeSelectWithField />
      <NativeSelectDisabled />
      <NativeSelectInvalid />
    </ExampleWrapper>
  )
}

function NativeSelectBasic() {
  return (
    <Example title="Basic">
      <NativeSelect>
        <NativeSelectOption value="">Select a fruit</NativeSelectOption>
        <NativeSelectOption value="apple">Apple</NativeSelectOption>
        <NativeSelectOption value="banana">Banana</NativeSelectOption>
        <NativeSelectOption value="blueberry">Blueberry</NativeSelectOption>
        <NativeSelectOption value="grapes" disabled>
          Grapes
        </NativeSelectOption>
        <NativeSelectOption value="pineapple">Pineapple</NativeSelectOption>
      </NativeSelect>
    </Example>
  )
}

function NativeSelectWithGroups() {
  return (
    <Example title="With Groups">
      <NativeSelect>
        <NativeSelectOption value="">Select a food</NativeSelectOption>
        <NativeSelectOptGroup label="Fruits">
          <NativeSelectOption value="apple">Apple</NativeSelectOption>
          <NativeSelectOption value="banana">Banana</NativeSelectOption>
          <NativeSelectOption value="blueberry">Blueberry</NativeSelectOption>
        </NativeSelectOptGroup>
        <NativeSelectOptGroup label="Vegetables">
          <NativeSelectOption value="carrot">Carrot</NativeSelectOption>
          <NativeSelectOption value="broccoli">Broccoli</NativeSelectOption>
          <NativeSelectOption value="spinach">Spinach</NativeSelectOption>
        </NativeSelectOptGroup>
// ... (70 more lines)

Subdomains

Dependencies

  • example
  • field
  • native-select

Frequently Asked Questions

What does native-select-example.tsx do?
native-select-example.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in native-select-example.tsx?
native-select-example.tsx defines 7 function(s): NativeSelectBasic, NativeSelectDisabled, NativeSelectExample, NativeSelectInvalid, NativeSelectSizes, NativeSelectWithField, NativeSelectWithGroups.
What does native-select-example.tsx depend on?
native-select-example.tsx imports 3 module(s): example, field, native-select.
Where is native-select-example.tsx in the architecture?
native-select-example.tsx is located at apps/v4/registry/bases/base/examples/native-select-example.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/examples).

Analyze Your Own Codebase

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

Try Supermodel Free