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

command-groups.tsx — ui Source File

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

File tsx DocumentationAtlas SearchAPI 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  0d2f327c_b552_7957_eedc_5cd4abfbe3d2["command-groups.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  0d2f327c_b552_7957_eedc_5cd4abfbe3d2 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  4b1d2128_46d9_46f0_b915_b6e1925b7876["button"]
  0d2f327c_b552_7957_eedc_5cd4abfbe3d2 --> 4b1d2128_46d9_46f0_b915_b6e1925b7876
  6bfe636e_b01e_60f8_51ec_ace45a509cd7["command"]
  0d2f327c_b552_7957_eedc_5cd4abfbe3d2 --> 6bfe636e_b01e_60f8_51ec_ace45a509cd7
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  0d2f327c_b552_7957_eedc_5cd4abfbe3d2 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 0d2f327c_b552_7957_eedc_5cd4abfbe3d2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Button } from "@/examples/radix/ui/button"
import {
  Command,
  CommandDialog,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
  CommandSeparator,
  CommandShortcut,
} from "@/examples/radix/ui/command"
import {
  CalculatorIcon,
  CalendarIcon,
  CreditCardIcon,
  SettingsIcon,
  SmileIcon,
  UserIcon,
} from "lucide-react"

export function CommandWithGroups() {
  const [open, setOpen] = React.useState(false)

  return (
    <div className="flex flex-col gap-4">
      <Button onClick={() => setOpen(true)} variant="outline" className="w-fit">
        Open Menu
      </Button>
      <CommandDialog open={open} onOpenChange={setOpen}>
        <Command>
          <CommandInput placeholder="Type a command or search..." />
          <CommandList>
            <CommandEmpty>No results found.</CommandEmpty>
            <CommandGroup heading="Suggestions">
              <CommandItem>
                <CalendarIcon />
                <span>Calendar</span>
              </CommandItem>
              <CommandItem>
                <SmileIcon />
                <span>Search Emoji</span>
              </CommandItem>
              <CommandItem>
                <CalculatorIcon />
                <span>Calculator</span>
              </CommandItem>
            </CommandGroup>
            <CommandSeparator />
            <CommandGroup heading="Settings">
              <CommandItem>
                <UserIcon />
                <span>Profile</span>
                <CommandShortcut>⌘P</CommandShortcut>
              </CommandItem>
              <CommandItem>
                <CreditCardIcon />
                <span>Billing</span>
                <CommandShortcut>⌘B</CommandShortcut>
              </CommandItem>
              <CommandItem>
                <SettingsIcon />
                <span>Settings</span>
                <CommandShortcut>⌘S</CommandShortcut>
              </CommandItem>
            </CommandGroup>
          </CommandList>
        </Command>
      </CommandDialog>
    </div>
  )
}

Subdomains

Dependencies

  • button
  • command
  • lucide-react
  • react

Frequently Asked Questions

What does command-groups.tsx do?
command-groups.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in command-groups.tsx?
command-groups.tsx defines 1 function(s): CommandWithGroups.
What does command-groups.tsx depend on?
command-groups.tsx imports 4 module(s): button, command, lucide-react, react.
Where is command-groups.tsx in the architecture?
command-groups.tsx is located at apps/v4/examples/radix/command-groups.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix).

Analyze Your Own Codebase

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

Try Supermodel Free