CommandWithShortcuts() — ui Function Reference
Architecture documentation for the CommandWithShortcuts() function in command-shortcuts.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 21ddff6c_8dce_595f_ab72_d59b09415c11["CommandWithShortcuts()"] 0abe2ad6_5bd6_6542_07b0_b3cf8d18efd1["command-shortcuts.tsx"] 21ddff6c_8dce_595f_ab72_d59b09415c11 -->|defined in| 0abe2ad6_5bd6_6542_07b0_b3cf8d18efd1 style 21ddff6c_8dce_595f_ab72_d59b09415c11 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/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/radix/command-shortcuts.tsx.
Where is CommandWithShortcuts() defined?
CommandWithShortcuts() is defined in apps/v4/examples/radix/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