Bakery
bakery.klarhimmel.page
Live
bakery.klarhimmel.page
npx shadcn add https://ui.klarhimmel.com/r/page-preview-card.jsonCopy for AIA page shown as a picture: the real page scaled into a 16:10 card, with its title, a meta line and a badge. The whole card is one link.
Import
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | required | The page to show: a same-origin preview URL. It renders at `viewport` px wide and is scaled down to the card. |
title | ReactNode | required | One line; the card's link text. |
href | string | required | Where the card goes (the editor, the live page). |
meta | ReactNode | - | A quiet line under the title: the address, when it was changed. |
badge | ReactNode | - | A string becomes a neutral Badge (Live, Draft); pass a Badge for another tone. |
viewport | number | 1280 | The width the page is laid out at before scaling. 1280 shows the desktop layout; 390 a phone. |
sandbox | string | 'allow-same-origin' | Iframe sandbox. The default runs no scripts, so a preview must be server-rendered HTML. |
link | (props: { href: string; className: string; children: ReactNode }) => ReactNode | plainLink | Renders the title link, for a router's Link (keeps app paths and client navigation). Default: a plain <a>. |
className | string | - | Extra classes, merged after the component's own. |