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

select-groups.tsx — ui Source File

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

File tsx DocumentationAtlas Changelog 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  5f094014_3389_1d1b_a0d0_5147b1399363["select-groups.tsx"]
  9e04de79_0b92_db17_84ad_a529f1990b55["select"]
  5f094014_3389_1d1b_a0d0_5147b1399363 --> 9e04de79_0b92_db17_84ad_a529f1990b55
  style 5f094014_3389_1d1b_a0d0_5147b1399363 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectLabel,
  SelectSeparator,
  SelectTrigger,
  SelectValue,
} from "@/examples/base/ui/select"

export function SelectGroups() {
  const fruits = [
    { label: "Apple", value: "apple" },
    { label: "Banana", value: "banana" },
    { label: "Blueberry", value: "blueberry" },
  ]
  const vegetables = [
    { label: "Carrot", value: "carrot" },
    { label: "Broccoli", value: "broccoli" },
    { label: "Spinach", value: "spinach" },
  ]
  const allItems = [
    { label: "Select a fruit", value: null },
    ...fruits,
    ...vegetables,
  ]
  return (
    <Select items={allItems}>
      <SelectTrigger className="w-full max-w-48">
        <SelectValue />
      </SelectTrigger>
      <SelectContent>
        <SelectGroup>
          <SelectLabel>Fruits</SelectLabel>
          {fruits.map((item) => (
            <SelectItem key={item.value} value={item.value}>
              {item.label}
            </SelectItem>
          ))}
        </SelectGroup>
        <SelectSeparator />
        <SelectGroup>
          <SelectLabel>Vegetables</SelectLabel>
          {vegetables.map((item) => (
            <SelectItem key={item.value} value={item.value}>
              {item.label}
            </SelectItem>
          ))}
        </SelectGroup>
      </SelectContent>
    </Select>
  )
}

Subdomains

Functions

Dependencies

  • select

Frequently Asked Questions

What does select-groups.tsx do?
select-groups.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in select-groups.tsx?
select-groups.tsx defines 1 function(s): SelectGroups.
What does select-groups.tsx depend on?
select-groups.tsx imports 1 module(s): select.
Where is select-groups.tsx in the architecture?
select-groups.tsx is located at apps/v4/examples/base/select-groups.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base).

Analyze Your Own Codebase

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

Try Supermodel Free