Components
Taped photo
A print taped in the notebook: slightly tilted, a thin white print border, a soft paper shadow and strips of tape. It holds any picture — an image, a video, a live scene.
import { TapedPhoto } from "@krizaka/ui/taped-photo";Web only — React, from @krizaka/ui/taped-photo. Beta: its API may still change in a minor version.
- Mobile · ✗ to build. It comes with the native paper roles of the Cahier. issue #421
Why it is here. Used by krizaka.com.
When to use
- The picture that opens a page on the Cahier: the flock's scene on www.krizaka.com, a chapter of /story.
- A photo the reader should feel was kept by hand: a shop's counter on its wall, a team photo.
When not to use
- A set of pictures to browse.Use instead: Media gallery
- The birds as numbered figures with their promises.Use instead: Bird plate
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { TapedPhoto } from "@krizaka/ui/taped-photo";Examples
The flock's scene
A live scene as a print taped at two corners, its caption written on it.
Taped at the top
tape="top", leaning right: a shop's photo on its wall.
Props
A print taped in the notebook: tilted, a white border, a paper shadow, tape at two corners or at the top.
| Prop | Type | Default | Description |
|---|---|---|---|
caption | ReactNode | — | A line written under the picture, on the print. |
tape | "none" | "top" | "corners" | corners | Where the tape holds it: two opposite corners, one strip at the top, or none. |
tilt | number | -1.6 | The tilt in degrees (negative leans left); eased on a phone. |
Accessibility
- A
figure; the caption is itsfigcaption, real text. - The tape and the shadow are decoration (pseudo-elements). Give the picture its own alternative text, or mark a decorative scene
aria-hiddenand say it in the caption. - The tilt is a transform: nothing moves under
prefers-reduced-motionbecause nothing animates.
Best practices
- One taped photo per screen: two prints side by side read as a collage, not as the page's picture.
- Keep the tilt small (−2° to 2°); lean the prints of one page the same way unless they face each other.
- The picture keeps its own box (an
aspect-ratioor a sized image), so the tilt never moves the layout. - Write the caption as a note, not a title: what it shows, where, when.
Related components
Generated from the code of @krizaka/ui 3.63.1: its meta.ts, its examples and its types.Edit this documentation on GitHub