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/output

Output

shadcn-htmx/output
FreeComponent

Live result region for the outcome of a calculation or server action. Renders the native <output> element (implicit role="status", an aria-live="polite" + aria-atomic="true" region), tied to its inputs via the for attribute. htmx innerHTML swaps of its content are announced by assistive tech automatically — 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/output.json

Source

registry/ui/output.tsxshadcn-htmx.productdevbook.com/r/output.json
1/** @jsxImportSource hono/jsx */
2import type { Child } from "hono/jsx"
3import { cn, type ClassValue } from "@/registry/lib/cn"
4
5// Output — shadcn-htmx, htmx v4 + Tailwind v4.
6//
7// A live result region: the outcome of a calculation or a server action,
8// tied to the inputs that produced it via the `for` attribute.
9//
10// Source of truth — we render the real native <output> element:
11// repos/mdn/files/en-us/web/html/reference/elements/output/index.md
12// - `for` — space-separated list of the ids of elements that
13// contributed input values to the calculation (lines 16-17).
14// - `form` — associate the output with a <form> elsewhere in the
15// document by its id; overrides an ancestor <form> (lines 18-21).
16// - `name` — the element's name in the form.elements API (lines 23-24).
17// - "Implicit ARIA role: status" (lines 119-120). shadcn/ui ships no
18// Output component — this is a native-platform addition.
19//
20// Why no JS: <output>'s implicit role="status" IS a live region with an
21// implicit aria-live="polite" and aria-atomic="true":
22// repos/mdn/files/en-us/web/accessibility/aria/reference/roles/status_role/index.md:18
23// repos/mdn/files/en-us/web/accessibility/aria/guides/live_regions/index.md:12
24// "Including ... role='status' ... works as long as you add the
25// attribute before the changes occur ... Start with an empty live
26// region, then change the content inside the region."
27// So an htmx swap of the output's CONTENT (hx-swap="innerHTML", with the
28// <output> itself as the persistent target) is announced automatically —
29// no aria-live wiring, no site.js. Native semantics do the work.
30//
31// htmx note: target the <output> and swap innerHTML so the live region
32// element persists across requests (a fresh outerHTML swap would replace
33// the region each time and defeat the announcement contract above).
34// repos/htmx/www/reference.md — hx-target, hx-swap (innerHTML).
35
36export type OutputTone = "default" | "muted" | "primary" | "destructive"
37
38const base =
39 "inline-flex min-h-9 w-fit items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium tabular-nums transition-colors " +
40 // htmx v4 adds .htmx-request to the swap target while a request that
41 // targets it is in flight — dim the stale value so the update reads as
42 // a refresh. See repos/htmx/www/reference.md (htmx-request class).
43 "[&.htmx-request]:opacity-60"
44
45const tones: Record<OutputTone, string> = {
46// … 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
yesterday

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
Active Searchactive-searchshadcn-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

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