Home / Function/ ToggleGroupWithInputAndSelect() — ui Function Reference

ToggleGroupWithInputAndSelect() — ui Function Reference

Architecture documentation for the ToggleGroupWithInputAndSelect() function in toggle-group-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  339c37e3_c39b_8235_27d1_4574274ac3a4["ToggleGroupWithInputAndSelect()"]
  7cfec362_e6dc_17ef_efcb_b8f12bc65346["toggle-group-example.tsx"]
  339c37e3_c39b_8235_27d1_4574274ac3a4 -->|defined in| 7cfec362_e6dc_17ef_efcb_b8f12bc65346
  style 339c37e3_c39b_8235_27d1_4574274ac3a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/toggle-group-example.tsx lines 338–373

function ToggleGroupWithInputAndSelect() {
  const items = [
    { label: "All", value: "all" },
    { label: "Active", value: "active" },
    { label: "Archived", value: "archived" },
  ]
  return (
    <Example title="With Input and Select">
      <div className="flex items-center gap-2">
        <Input type="search" placeholder="Search..." className="flex-1" />
        <Select items={items} defaultValue={items[0]}>
          <SelectTrigger className="w-32">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            <SelectGroup>
              {items.map((item) => (
                <SelectItem key={item.value} value={item.value}>
                  {item.label}
                </SelectItem>
              ))}
            </SelectGroup>
          </SelectContent>
        </Select>
        <ToggleGroup defaultValue={["grid"]} variant="outline">
          <ToggleGroupItem value="grid" aria-label="Grid view">
            Grid
          </ToggleGroupItem>
          <ToggleGroupItem value="list" aria-label="List view">
            List
          </ToggleGroupItem>
        </ToggleGroup>
      </div>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free