Home / Function/ CommandBasic() — ui Function Reference

CommandBasic() — ui Function Reference

Architecture documentation for the CommandBasic() function in command-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  ec12d86e_1682_70a3_385c_5805a1832d22["CommandBasic()"]
  05451646_c67d_fa9d_bea2_9a9342a11b2c["command-example.tsx"]
  ec12d86e_1682_70a3_385c_5805a1832d22 -->|defined in| 05451646_c67d_fa9d_bea2_9a9342a11b2c
  style ec12d86e_1682_70a3_385c_5805a1832d22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/command-example.tsx lines 121–150

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

  return (
    <Example title="Basic">
      <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>Calendar</CommandItem>
                <CommandItem>Search Emoji</CommandItem>
                <CommandItem>Calculator</CommandItem>
              </CommandGroup>
            </CommandList>
          </Command>
        </CommandDialog>
      </div>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does CommandBasic() do?
CommandBasic() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/command-example.tsx.
Where is CommandBasic() defined?
CommandBasic() is defined in apps/v4/registry/bases/radix/examples/command-example.tsx at line 121.

Analyze Your Own Codebase

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

Try Supermodel Free