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/media-player

Media Player

shadcn-htmx/media-player
FreeComponent

A styled native <video controls> / <audio controls> with multiple <source> formats, <track> captions, a poster, and aspect-ratio framing. The browser ships the entire accessible playback UI — play, scrub, volume, captions, fullscreen, Picture-in-Picture — so there are no custom controls and zero JavaScript.

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/media-player.json

Source

registry/ui/media-player.tsxshadcn-htmx.productdevbook.com/r/media-player.json · first 6 KB
1/** @jsxImportSource hono/jsx */
2import type { Child } from "hono/jsx"
3import { cn, type ClassValue } from "@/registry/lib/cn"
4
5// Media Player — shadcn-htmx, htmx v4 + Tailwind v4.
6//
7// A styled native <video controls> / <audio controls>. The browser ships a
8// complete, accessible playback UI — play/pause, scrubber, volume, captions
9// toggle, fullscreen, Picture-in-Picture — so we render the real platform
10// element and only frame it (rounded card, aspect-ratio, poster). No custom
11// controls, no JavaScript: the platform already does playback, and we never
12// emulate a feature the browser ships (see AGENTS.md rule 4).
13//
14// Multiple <source> children let the browser pick the first format it can
15// decode (webm → mp4 fallback, etc.); <track kind="captions"> overlays
16// WebVTT subtitles/captions the native UI can toggle.
17//
18// Built on:
19// - <video> — embeds a media player with native controls (play, seek,
20// volume, fullscreen, PiP). `controls`, `poster`, `preload`, `loop`,
21// `muted`, `playsinline`, `crossorigin`, `width`/`height`.
22// repos/mdn/files/en-us/web/html/reference/elements/video/index.md
23// - <audio> — same playback API without a visual frame; the native
24// control bar is the whole UI.
25// repos/mdn/files/en-us/web/html/reference/elements/audio/index.md
26// - <source> — one media resource per format; the browser uses the first
27// it can play. `src` + `type` (MIME, optionally with codecs).
28// repos/mdn/files/en-us/web/html/reference/elements/source/index.md
29// - <track> — timed WebVTT text track (captions/subtitles/descriptions/
30// chapters). `kind`, `src`, `srclang`, `label`, `default`.
31// repos/mdn/files/en-us/web/html/reference/elements/track/index.md
32//
33// CSS framing reuses the aspect-ratio approach (native `aspect-ratio`, no
34// padding hack):
35// repos/mdn/files/en-us/web/css/reference/properties/aspect-ratio/index.md
36//
37// Accessibility:
38// - Native controls are keyboard-operable and labelled by the user agent.
39// - Provide a <track kind="captions"> for spoken content (WCAG 1.2.2).
40// - When no caption track exists, pass `ariaLabel` so AT announces what
41// the player plays. The text inside the element is the no-support
42// fallback shown to browsers that can't render <video>/<audio>.
43
44export type MediaSource = {
45 // URL of the media resource.
46 src: string
47 // MIME type, optionally with a codecs parameter, e.g. 'video/webm',
48// … 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
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