BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fulldev/ui/command

command

fulldev-ui/command
FreeComponent

fulldev/ui publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.full.dev/r/command.json

Source

src/components/ui/command/command.astroui.full.dev/r/command.json
1---
2import type { HTMLAttributes } from "astro/types"
3
4import { cn } from "@/lib/utils"
5
6type Props = HTMLAttributes<"div"> & {
7 label?: string
8 defaultValue?: string
9 defaultSearch?: string
10 shouldFilter?: boolean
11 loop?: boolean
12 disablePointerSelection?: boolean
13 vimBindings?: boolean
14}
15
16const {
17 class: className,
18 label,
19 defaultValue,
20 defaultSearch,
21 shouldFilter,
22 loop,
23 disablePointerSelection,
24 vimBindings,
25 ...props
26} = Astro.props
27---
28
29<div
30 data-slot="command"
31 data-label={label}
32 data-default-value={defaultValue}
33 data-default-search={defaultSearch}
34 data-should-filter={shouldFilter}
35 data-loop={loop}
36 data-disable-pointer-selection={disablePointerSelection}
37 data-vim-bindings={vimBindings}
38 class={cn(
39 "bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1",
40 className
41 )}
42 {...props}
43>
44 <slot />
45</div>
46
47<script>
48 import { create } from "@data-slot/command"
49
50 const initCommand = () => {
51 create()
52
53 document.querySelectorAll("[data-slot=command]").forEach((command) => {
54 if (!(command instanceof HTMLElement)) return
55 if (command.dataset.linkNavigation === "true") return
56
57 command.dataset.linkNavigation = "true"
58 command.addEventListener("command:select", (event) => {
59 const { detail } = event as CustomEvent<{ value?: unknown }>
60 const value = detail?.value
61 if (typeof value !== "string") return
62
63 const item = Array.from(
64 command.querySelectorAll("[data-slot=command-item][href]")
65 ).find((item) => item.getAttribute("data-value") === value)
66 const href = item?.getAttribute("href")
67
68 if (href) window.location.href = href
69 })
70 })
71 }
72
73 initCommand()
74
75 document.addEventListener("astro:page-load", initCommand)
76</script>

What it pulls in

npm packages

  • @data-slot/command

Other registry items

  • @fulldev/dialog
  • @fulldev/icon

Files it writes

  • src/components/ui/command/command.astro
  • src/components/ui/command/command-dialog.astro
  • src/components/ui/command/command-input.astro
  • src/components/ui/command/command-list.astro
  • src/components/ui/command/command-empty.astro
  • src/components/ui/command/command-group.astro
  • src/components/ui/command/command-item.astro
  • src/components/ui/command/command-separator.astro
  • src/components/ui/command/command-shortcut.astro
  • src/components/ui/command/index.ts

Facts

Registry
fulldev/ui
Type
registry:ui
Access
Free
Files written
10
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on fulldev/ui ui.full.dev fulldotdev/ui on GitHub Raw registry item This item as JSON

More from fulldev/ui

All 144 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionfulldev/uiComponentsFree1 dep · 5 files
alertalertfulldev/uiComponentsFreeno deps · 5 files
alert-dialogalert-dialogfulldev/uiComponentsFree1 dep · 13 files
avataravatarfulldev/uiComponentsFreeno deps · 7 files
badgebadgefulldev/uiComponentsFreeno deps · 3 files
bannerbannerfulldev/uiComponentsFreeno deps · 3 files
breadcrumbbreadcrumbfulldev/uiComponentsFreeno deps · 8 files
buttonbuttonfulldev/uiComponentsFreeno deps · 3 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex