Heading Block

A stack of icon, heading, description, and actions that stands in for missing content, or sits beside an image.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/lockup.json

Usage

import {
  Lockup, LockupMedia, LockupEyebrow, LockupTitle, LockupDescription, LockupBody, LockupActions,
} from "@/components/ui/lockup"

Examples

Default

The empty state: an icon, what happened, and a way forward. Always give it LockupActions; without one the message is a dead end.

No matching invoices

Nothing came back for that search in the last 90 days. Try a shorter phrase, or widen the date range.

Eyebrow

The kicker that names a section, above the title. The caps, tracking, weight, and size all live in the component, so nothing is set at the call site. It is muted by default; pass className="text-accent" for the marketing treatment. It adds no gap of its own.

Why super templates?

Everything your team needs to ship a page, already decided

Layout, type, and spacing come pre-resolved, so the only thing left to choose is the words.

Quieter section

subsection heads a band one step below its neighbours: a 20px title over 14px copy, with no inset of its own. Use it for a secondary band, never for the page's main sections.

Complete the set

Pieces cut from the same batch of clay, glazed to match what you just ordered.

Chapter heading

A display-size band heading for a page where each band is a chapter: lg with align="start" inside a Section, which drops its own padding. dot puts an accent dot before the eyebrow.

Chapter two

How the work gets made

Every piece is thrown, trimmed and fired in the same small studio.

As a section label

On its own it is the kit's small caps label for a group of controls or facts in a side rail, with no title or description beside it. Give it an id and point the group at it with aria-labelledby. The 8px gap to the group is yours to set.

Status

Draft, last saved 2 minutes ago

People

Ava Chen, Marcus Webb

Sizes

One message at all six sizes. Only the media, type, and gaps change; the parts and their order never do. subsection, section and page head real content rather than standing in for missing content, so none of them pads itself.

Your inbox is clear

Nothing needs your attention right now.

Your inbox is clear

Nothing needs your attention right now.

Your inbox is clear

Nothing needs your attention right now.

Your inbox is clear

Nothing needs your attention right now.

Your inbox is clear

Nothing needs your attention right now.

Your inbox is clear

Nothing needs your attention right now.

Alignment

The same lockup inside a card, left-aligned and centered. Left reads better when the card is narrow enough that centered text leaves ragged edges on both sides. align defaults to center, so the second card passes nothing.

No shared files

Files people share with you land here.

No shared files

Files people share with you land here.

Side by side

layout="side" puts the media beside the copy, for a success screen with art. align places the pair; the copy stays left-aligned beside the media. Under 24rem of lockup width it stacks and follows align.

You’re in.

Your spot is saved. We’ll email you the moment your invite is ready.

Surface

An empty state in a tall pane has nothing holding it. dashed marks a space content will fill; muted is a quieter filled panel. Both span the container.

No post yet

Write one from the source.

No replies yet

Replies land here as they come in.

Tones

Tone tints the media chip and its glyph. It never changes the box, the type, or the layout.

Nothing here yet

Neutral reads as a resting state, not a problem.

No results

Accent is the default: an ordinary, expected outcome.

Import finished

Success confirms work that just completed.

Connection lost

Destructive is for a failure the reader has to act on.

Full page

The lg size, sized for a route that has nothing else on it. Set level={1} so the message is the page's heading, and step the buttons up to size="lg" to match the display-size title.

The run failed

The run was stopped, usually because the dev server restarted. Your transcript is saved.

API Reference

PropTypeDefaultDescription
sizeLockup"sm" | "md" | "subsection" | "section" | "page" | "lg""md"Scales the media, type, gaps, and the description's width cap. Every part reads this off the root, so you set it once. section is for heading a page section and subsection for a quieter band (20px title, 14px copy); page is a page's own headline sharing the viewport with other content; lg is a full, empty page. On a phone, section, page and lg titles drop one step (20 / 24 / 28px), and page and lg copy drops to 15.5px.
alignLockup"center" | "start" | "end""center"start left-aligns the text and the action row, and is the choice for a section heading; end right-aligns them. With layout="side" it places the media and copy together, and defaults to start. Uses logical alignment, so it flips under RTL.
layoutLockup"stack" | "side""stack"side puts LockupMedia in a column of its own and the other parts in a column beside it. Under 24rem of lockup width it stacks instead. The media must be a direct child.
sideAlignLockup"start" | "center""start"Side layout only. start lines the copy up with the top of the media; center with its middle.
surfaceLockup"none" | "dashed" | "muted""none"Boxes the lockup at the container's full width, for an empty state that would float in a tall pane. dashed is a space content will fill, with AddTile's edge; muted is a quieter filled panel. The size's own padding becomes the inset.
toneLockupMedia"neutral" | "accent" | "success" | "destructive""accent"Colors the glyph, and the chip behind it when variant is tinted. Nothing else changes.
variantLockupMedia"tinted" | "bare""tinted"bare drops the chip and steps the glyph up one size, since an icon with nothing behind it needs more size to hold the same weight. Use it in tight containers, or when the media is an avatar or an image.
levelLockupTitle1 | 2 | 3 | 4 | 5 | 62Heading rank. A full-page lockup is usually the page's h1; one inside a card is usually an h3.
classNameLockupEyebrowstringNoneThe kicker above the title, and the system's one sanctioned uppercase surface in page content. Its case, tracking and weight read --eyebrow-case, --eyebrow-tracking and --eyebrow-weight. Muted by default so it stays subordinate to the title; pass text-accent for the marketing treatment. Sized for section, page, and lg.
dotLockupEyebrowbooleanfalseAn accent dot before the label, for a page where each band is a chapter. Decoration only, hidden from screen readers.
childrenLockupBodyReact.ReactNodeNoneContent that belongs to the message, between the description and LockupActions: an install command, an email field. Takes the same space above it as the action row and follows the lockup's alignment.
sizeLockup"sm" | "md" | "subsection" | "section" | "page" | "lg" = "md"Scales the media, type, gaps, and the description's width cap. Every part reads this off the root, so you set it once. section is for heading a page section and subsection for a quieter band (20px title, 14px copy); page is a page's own headline sharing the viewport with other content; lg is a full, empty page. On a phone, section, page and lg titles drop one step (20 / 24 / 28px), and page and lg copy drops to 15.5px.
alignLockup"center" | "start" | "end" = "center"start left-aligns the text and the action row, and is the choice for a section heading; end right-aligns them. With layout="side" it places the media and copy together, and defaults to start. Uses logical alignment, so it flips under RTL.
layoutLockup"stack" | "side" = "stack"side puts LockupMedia in a column of its own and the other parts in a column beside it. Under 24rem of lockup width it stacks instead. The media must be a direct child.
sideAlignLockup"start" | "center" = "start"Side layout only. start lines the copy up with the top of the media; center with its middle.
surfaceLockup"none" | "dashed" | "muted" = "none"Boxes the lockup at the container's full width, for an empty state that would float in a tall pane. dashed is a space content will fill, with AddTile's edge; muted is a quieter filled panel. The size's own padding becomes the inset.
toneLockupMedia"neutral" | "accent" | "success" | "destructive" = "accent"Colors the glyph, and the chip behind it when variant is tinted. Nothing else changes.
variantLockupMedia"tinted" | "bare" = "tinted"bare drops the chip and steps the glyph up one size, since an icon with nothing behind it needs more size to hold the same weight. Use it in tight containers, or when the media is an avatar or an image.
levelLockupTitle1 | 2 | 3 | 4 | 5 | 6 = 2Heading rank. A full-page lockup is usually the page's h1; one inside a card is usually an h3.
classNameLockupEyebrowstringThe kicker above the title, and the system's one sanctioned uppercase surface in page content. Its case, tracking and weight read --eyebrow-case, --eyebrow-tracking and --eyebrow-weight. Muted by default so it stays subordinate to the title; pass text-accent for the marketing treatment. Sized for section, page, and lg.
dotLockupEyebrowboolean = falseAn accent dot before the label, for a page where each band is a chapter. Decoration only, hidden from screen readers.
childrenLockupBodyReact.ReactNodeContent that belongs to the message, between the description and LockupActions: an install command, an email field. Takes the same space above it as the action row and follows the lockup's alignment.