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

Landmarks

shadcn-htmx/landmarks
FreeComponent

An accessible page-shell from the native HTML landmark elements (header, nav, search, main, aside, section, footer). Thin semantic wrappers that expose the matching ARIA landmark role, with aria-label/aria-labelledby where the APG Landmarks practice requires a unique name. 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/landmarks.json

Source

registry/ui/landmarks.tsxshadcn-htmx.productdevbook.com/r/landmarks.json · first 6 KB
1/** @jsxImportSource hono/jsx */
2import type { PropsWithChildren, Child } from "hono/jsx"
3import { cn, type ClassValue } from "@/registry/lib/cn"
4
5// Landmarks — shadcn-htmx, htmx v4 + Tailwind v4.
6//
7// An accessible page-shell built from the native HTML landmark elements.
8// Pure structure — no JS. Each subcomponent is a thin semantic wrapper
9// around the native element that implicitly exposes the matching ARIA
10// landmark role, so assistive-tech users can jump between the major
11// regions of the page.
12//
13// Native element → implicit landmark role
14// <header> (in body context) → banner
15// <nav> → navigation
16// <search> → search
17// <main> → main
18// <aside> → complementary
19// <section> (when labelled) → region
20// <form> (when labelled) → form
21// <footer> (in body context) → contentinfo
22//
23// Labelling rules (when to pass an aria-label / aria-labelledby) come
24// straight from the APG. Several landmark roles must (region) or should
25// (navigation, complementary, search) carry a unique label so multiple
26// landmarks of the same type are distinguishable.
27//
28// APG (read for the per-role design patterns + labelling rules):
29// repos/aria-practices/content/patterns/landmarks/examples/banner.html
30// repos/aria-practices/content/patterns/landmarks/examples/navigation.html
31// repos/aria-practices/content/patterns/landmarks/examples/main.html
32// repos/aria-practices/content/patterns/landmarks/examples/complementary.html
33// repos/aria-practices/content/patterns/landmarks/examples/region.html
34// repos/aria-practices/content/patterns/landmarks/examples/search.html
35// repos/aria-practices/content/patterns/landmarks/examples/contentinfo.html
36// MDN (the native <search> element defines a search landmark — no role=search needed):
37// repos/mdn/files/en-us/web/html/reference/elements/search/index.md:20-22
38
39type LandmarkProps = PropsWithChildren<
40 {
41 class?: ClassValue
42 id?: string
43 // The accessible name for this landmark. Where the APG calls for one
44 // (navigation, complementary, search when there is more than one; and
45 // always for region) pass either ariaLabel or ariaLabelledby.
46 ariaLabel?: string
47 ariaLabelledby?: string
48 } & Record<string, any>
49>
50
51// <header> in body context = banner landmark. Top-level only: a <header>
52// … truncated

Facts

Registry
shadcn-htmx
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-02
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
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