CommandWithShortcuts() — ui Function Reference
Architecture documentation for the CommandWithShortcuts() function in command-shortcuts.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 81345eb5_168d_99f9_a198_d5b3ea52244f["CommandWithShortcuts()"] 91f0c3ba_99bb_d1c4_37a0_70898e54454d["command-shortcuts.tsx"] 81345eb5_168d_99f9_a198_d5b3ea52244f -->|defined in| 91f0c3ba_99bb_d1c4_37a0_70898e54454d style 81345eb5_168d_99f9_a198_d5b3ea52244f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/command-shortcuts.tsx lines 17–52
export function CommandWithShortcuts() {
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="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>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does CommandWithShortcuts() do?
CommandWithShortcuts() is a function in the ui codebase, defined in apps/v4/examples/base/command-shortcuts.tsx.
Where is CommandWithShortcuts() defined?
CommandWithShortcuts() is defined in apps/v4/examples/base/command-shortcuts.tsx at line 17.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free