Skip to Content

Screenshot Plate

Screenshot plate: a product screenshot mounted on a painted mat, a delft ColorWash ground with a ScreenshotFrame bleeding the shot off the bottom. Pass a light and dark ScreenshotImage pair as children.

Installation

pnpm dlx shadcn@latest add @01orbital/screenshot-plate

Usage

import { ScreenshotImage } from "@/components/media/screenshot-frame"
import { ScreenshotPlate } from "@/components/media/screenshot-plate"

const ALT =
  "The Soundscapes screen: a search for “tin roof” with its result, and the prompt box below."

export default function ScreenshotPlateDemo() {
  return (
    <ScreenshotPlate className="max-w-4xl rounded-sm">
      <ScreenshotImage
        src="https://01orbital.dev/screenshots/dashboard-light.webp"
        alt={ALT}
        width={2880}
        height={1666}
        className="w-full dark:hidden"
      />
      <ScreenshotImage
        src="https://01orbital.dev/screenshots/dashboard-dark.webp"
        alt={ALT}
        width={2880}
        height={1666}
        className="w-full not-dark:hidden"
      />
    </ScreenshotPlate>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/screenshot-plate-demo

Examples

Indigo Dashboardscreenshot-plate-indigo-dashboard

Feature screenshot example showing ScreenshotPlate: a dark dashboard sits in a delft painted mat within an indigo feature.

pnpm dlx shadcn@latest add @01orbital/screenshot-plate-indigo-dashboard

API reference

A screenshot on a painted mat: a ColorWash is the ground, and the shot sits in a gutter and runs off the edge placement names, the bottom by default. Put ScreenshotImage children inside, such as a light and a dark shot shown with dark:hidden and not-dark:hidden. Give the plate a height to cut the shot at the bleed edge.

Prop

Type

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

Dependencies

npm: cn. The CLI installs it for you.

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

Last updated on