Paper Hero

Hero printed on paper: hairline frame, letterpress buttons and a plate tipped in beside the copy. Eyebrow, title, description, actions, plate art, plate caption and cream or black tone are props.

Installation

npx shadcn@latest add @01orbital/paper-hero

Usage

import { PaperHero } from "@/components/hero/paper-hero"
import { ColorWash } from "@/components/scene/color-wash"
import { DemoLabel } from "@/components/text/demo-label"

// The copy: change text here, not in the markup.
const COPY = {
  eyebrow: "Orbcore Catalog №1",
  title: "Components, pressed into paper.",
  description:
    "A registry that you can hold: cream stock, letterpress ink, and a plate tipped in by hand.",
  plate: { caption: "Plate 01", label: "The Gallery of Sol" },
  captions: {
    cream: "Tone cream, with eyebrow and plate caption",
    black: "Tone black, no plate caption",
    art: "Art: your own picture",
  },
} as const

const ACTIONS = [
  { label: "View catalog", href: "#" },
  { label: "Browse plates", href: "#" },
] as const

/** Paper Hero on cream paper with an eyebrow and a plate caption, on black
 * paper without a caption, and with its own art on the plate. */
export default function PaperHeroDemo() {
  return (
    <div className="grid w-full gap-8">
      <div className="grid gap-2">
        <PaperHero
          level={2}
          tone="cream"
          eyebrow={COPY.eyebrow}
          title={COPY.title}
          description={COPY.description}
          actions={ACTIONS}
          plate={COPY.plate}
        />
        <DemoLabel className="px-6">{COPY.captions.cream}</DemoLabel>
      </div>
      <div className="grid gap-2">
        <PaperHero
          level={2}
          tone="black"
          title={COPY.title}
          description={COPY.description}
          actions={ACTIONS}
        />
        <DemoLabel className="px-6">{COPY.captions.black}</DemoLabel>
      </div>
      <div className="grid gap-2">
        <PaperHero
          level={2}
          title={COPY.title}
          description={COPY.description}
          actions={ACTIONS}
          plate={COPY.plate}
          art={
            <ColorWash
              color="rose"
              grain={0.18}
              className="aspect-4/5 w-full"
            />
          }
        />
        <DemoLabel className="px-6">{COPY.captions.art}</DemoLabel>
      </div>
    </div>
  )
}

This example installs with everything it uses:

npx shadcn@latest add @01orbital/paper-hero-demo

API reference

A hero printed on paper: a hairline frame, the copy and letterpress buttons on one side, and a plate tipped in by hand on the other, which stacks below the copy on narrower screens. The headline is Geist with a pressed highlight, and the buttons look inked. Other props go to the Paper Sheet.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

One block is built with Paper Hero.

Last updated on