Skip to Content

Paper Sheet

Paper sheet surface with fine grain: warm cream printed in dark ink, or black printed in silver. Text inside takes the paper's ink, for letterpress and stationery cards.

Installation

pnpm dlx shadcn@latest add @01orbital/paper-sheet

Usage

import { PaperSheet } from "@/components/texture/paper-sheet"
import { CardDescription, CardTitle } from "@/components/ui/card"

// A business card, 3.5 by 2, on cream paper with a printed hairline frame.
export default function PaperSheetDemo() {
  return (
    <div className="flex min-h-full w-full flex-1 items-center justify-center p-6">
      <PaperSheet
        tone="cream"
        className="aspect-7/4 w-full max-w-sm rounded-md"
      >
        <div
          aria-hidden="true"
          className="pointer-events-none absolute inset-6 border border-[oklch(0.300_0.021_83/0.2)] sm:inset-10"
        />
        <div className="grid h-full content-end p-12">
          <CardTitle>Pamela Melroy</CardTitle>
          <CardDescription>Studio director</CardDescription>
        </div>
      </PaperSheet>
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/paper-sheet-demo

Examples

Blueprintpaper-sheet-blueprint

Paper Sheet Blueprint: an example of paper-sheet.

pnpm dlx shadcn@latest add @01orbital/paper-sheet-blueprint

Sagepaper-sheet-sage

Paper Sheet Sage: an example of paper-sheet.

pnpm dlx shadcn@latest add @01orbital/paper-sheet-sage

API reference

A sheet of paper with a fine grain, as a section: warm cream printed in dark ink, or black printed in silver. Text inside takes the paper's ink through --foreground and --muted-foreground.

Prop

Type

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

Dependencies

npm: cn. The CLI installs it for you.

Used in blocks

One block is built with Paper Sheet.

Last updated on