CommandWithShortcuts() — ui Function Reference
Architecture documentation for the CommandWithShortcuts() function in command-example.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 7e530d71_b49e_6ebb_0e24_78aba87b2a8d["CommandWithShortcuts()"] 05451646_c67d_fa9d_bea2_9a9342a11b2c["command-example.tsx"] 7e530d71_b49e_6ebb_0e24_78aba87b2a8d -->|defined in| 05451646_c67d_fa9d_bea2_9a9342a11b2c style 7e530d71_b49e_6ebb_0e24_78aba87b2a8d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/radix/examples/command-example.tsx lines 152–211
function CommandWithShortcuts() {
const [open, setOpen] = React.useState(false)
return (
<Example title="With Shortcuts">
<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>
<IconPlaceholder
lucide="UserIcon"
tabler="IconUser"
hugeicons="UserIcon"
phosphor="UserIcon"
remixicon="RiUserLine"
/>
<span>Profile</span>
<CommandShortcut>⌘P</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="CreditCardIcon"
tabler="IconCreditCard"
hugeicons="CreditCardIcon"
phosphor="CreditCardIcon"
remixicon="RiBankCardLine"
/>
<span>Billing</span>
<CommandShortcut>⌘B</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="SettingsIcon"
tabler="IconSettings"
hugeicons="SettingsIcon"
phosphor="GearIcon"
remixicon="RiSettingsLine"
/>
<span>Settings</span>
<CommandShortcut>⌘S</CommandShortcut>
</CommandItem>
</CommandGroup>
</CommandList>
</Command>
</CommandDialog>
</div>
</Example>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does CommandWithShortcuts() do?
CommandWithShortcuts() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/command-example.tsx.
Where is CommandWithShortcuts() defined?
CommandWithShortcuts() is defined in apps/v4/registry/bases/radix/examples/command-example.tsx at line 152.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free