Krizaka UI
Krizaka UI
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.

Web · ✓Mobile · ✗ to buildDesktop · ✓BetaBlocks
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 tailwindcss

Styles

@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.

Le comptoir, rue Saint-Denis

Props

A print taped in the notebook: tilted, a white border, a paper shadow, tape at two corners or at the top.

PropTypeDefaultDescription
captionReactNode—A line written under the picture, on the print.
tape"none" | "top" | "corners"cornersWhere the tape holds it: two opposite corners, one strip at the top, or none.
tiltnumber-1.6The tilt in degrees (negative leans left); eased on a phone.

Accessibility

  • A figure; the caption is its figcaption, real text.
  • The tape and the shadow are decoration (pseudo-elements). Give the picture its own alternative text, or mark a decorative scene aria-hidden and say it in the caption.
  • The tilt is a transform: nothing moves under prefers-reduced-motion because 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-ratio or a sized image), so the tilt never moves the layout.
  • Write the caption as a note, not a title: what it shows, where, when.

Generated from the code of @krizaka/ui 3.63.1: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page