BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-htmx/active-search

Active Search

shadcn-htmx/active-search
FreeComponent

A debounced live-search box (native <form role="search"> + <input type="search">) that filters an external results list/table as you type, with an inline loading indicator and stale-request cancellation. Submits as a normal GET search on Enter with zero JS.

Live preview

live · rendered by the registry
Rendered by shadcn-htmx on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://shadcn-htmx.productdevbook.com/r/active-search.json

Source

registry/ui/active-search.tsxshadcn-htmx.productdevbook.com/r/active-search.json · first 6 KB
1/** @jsxImportSource hono/jsx */
2import type { Child } from "hono/jsx"
3import { cn, type ClassValue } from "@/registry/lib/cn"
4
5// Active Search — shadcn-htmx, htmx v4 + Tailwind v4.
6//
7// A debounced live-search box that filters an external results list/table as
8// the user types, with an inline loading indicator and stale-request
9// cancellation. It degrades to a normal GET search on Enter when JS is off.
10//
11// **Native-first.** The control is a real <form> wrapping <input type="search">.
12// - The <form action> means Enter submits a normal navigation search with
13// zero JS — progressive enhancement, not emulation.
14// - <input type="search"> gives the platform clear-field affordance + a
15// `search` event that fires on Enter and when the field is cleared.
16// We add `search` to hx-trigger so clearing re-runs the filter.
17// See repos/mdn/files/en-us/web/html/reference/elements/input/search/index.md
18// repos/mdn/files/en-us/web/api/htmlinputelement/search_event/index.md
19//
20// htmx wiring (verified against the vendored v4 source):
21// - hx-trigger="input changed delay:Nms, search" — `input changed delay`
22// debounces keystrokes and ignores no-op keys (arrows); the `search`
23// event covers Enter + the native clear button.
24// See repos/htmx/www/src/content/reference/01-attributes/06-hx-trigger.md
25// repos/htmx/www/src/content/patterns/02-forms/01-active-search.md
26// - hx-sync="this:replace" — aborts the in-flight request and replaces it
27// with the latest one, so stale responses never clobber fresh input.
28// See repos/htmx/www/src/content/reference/01-attributes/21-hx-sync.md
29// - hx-indicator — htmx toggles the `.htmx-request` class on the indicator
30// while a request is in flight; we drive an opacity transition off it.
31// See repos/htmx/www/src/content/reference/01-attributes/19-hx-indicator.md
32//
33// No custom JS: the debounce, cancellation, and indicator are all htmx; the
34// no-JS fallback is the native <form>. data-slot is for styling/testing hooks.
35
36const formBase = "relative w-full"
37
38const inputBase =
39 "flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent py-1 pr-9 pl-9 text-base shadow-xs transition-[color,box-shadow] outline-none " +
40 "selection:bg-primary selection:text-primary-foreground " +
41 "placeholder:text-muted-foreground " +
42 "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 " +
43 "md:text-sm dark:bg-input/30 " +
44// … truncated

Facts

Registry
shadcn-htmx
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on shadcn-htmx shadcn-htmx.productdevbook.com productdevbook/shadcn-htmx on GitHub Raw registry item This item as JSON

More from shadcn-htmx

All 83 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionshadcn-htmxComponentsFreeno deps
Alertalertshadcn-htmxComponentsFreeno deps
Alert Dialogalert-dialogshadcn-htmxComponentsFreeno deps
Aspect Ratioaspect-ratioshadcn-htmxComponentsFreeno deps
Auto Gridauto-gridshadcn-htmxComponentsFreeno deps
Autocompleteautocompleteshadcn-htmxComponentsFreeno deps
Autosize Textareaautosize-textareashadcn-htmxComponentsFreeno deps
Avataravatarshadcn-htmxComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex