Home / Function/ SelectWithField() — ui Function Reference

SelectWithField() — ui Function Reference

Architecture documentation for the SelectWithField() function in select-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  d2d5444d_2ea7_6b67_3dc5_9ee7dfadf356["SelectWithField()"]
  da287030_2184_07ad_21e7_133141a5c3fa["select-example.tsx"]
  d2d5444d_2ea7_6b67_3dc5_9ee7dfadf356 -->|defined in| da287030_2184_07ad_21e7_133141a5c3fa
  style d2d5444d_2ea7_6b67_3dc5_9ee7dfadf356 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/select-example.tsx lines 436–469

function SelectWithField() {
  const items = [
    { label: "Select a fruit", value: null },
    { label: "Apple", value: "apple" },
    { label: "Banana", value: "banana" },
    { label: "Blueberry", value: "blueberry" },
    { label: "Grapes", value: "grapes" },
    { label: "Pineapple", value: "pineapple" },
  ]
  return (
    <Example title="With Field">
      <Field>
        <FieldLabel htmlFor="select-fruit">Favorite Fruit</FieldLabel>
        <Select items={items}>
          <SelectTrigger id="select-fruit">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            <SelectGroup>
              {items.map((item) => (
                <SelectItem key={item.value} value={item.value}>
                  {item.label}
                </SelectItem>
              ))}
            </SelectGroup>
          </SelectContent>
        </Select>
        <FieldDescription>
          Choose your favorite fruit from the list.
        </FieldDescription>
      </Field>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does SelectWithField() do?
SelectWithField() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/select-example.tsx.
Where is SelectWithField() defined?
SelectWithField() is defined in apps/v4/registry/bases/base/examples/select-example.tsx at line 436.

Analyze Your Own Codebase

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

Try Supermodel Free