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