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 ChartRegistry 3 imports 7 functions

Entity Profile

Dependency Diagram

graph LR
  caea9a88_63ad_a068_ead5_829590ec8b5c["native-select-example.tsx"]
  da02b53a_0c1d_d1a1_af31_74d99f1cdd7a["example"]
  caea9a88_63ad_a068_ead5_829590ec8b5c --> da02b53a_0c1d_d1a1_af31_74d99f1cdd7a
  e2659e08_4bcd_4a08_ab57_ce3a18c3b284["field"]
  caea9a88_63ad_a068_ead5_829590ec8b5c --> e2659e08_4bcd_4a08_ab57_ce3a18c3b284
  309c3590_7c44_3abc_b702_cf70b2cec0a3["native-select"]
  caea9a88_63ad_a068_ead5_829590ec8b5c --> 309c3590_7c44_3abc_b702_cf70b2cec0a3
  style caea9a88_63ad_a068_ead5_829590ec8b5c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/radix/components/example"
import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@/registry/bases/radix/ui/field"
import {
  NativeSelect,
  NativeSelectOptGroup,
  NativeSelectOption,
} from "@/registry/bases/radix/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, ChartRegistry 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/radix/examples/native-select-example.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/examples).

Analyze Your Own Codebase

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

Try Supermodel Free