Krizaka UI
Krizaka UI
Composants

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 · ✗ à construireBureau · ✓BêtaBlocs
import { TapedPhoto } from "@krizaka/ui/taped-photo";

Web uniquement — React, depuis @krizaka/ui/taped-photo. Bêta : son API peut encore changer à une version mineure.

  • Mobile · ✗ à construire. It comes with the native paper roles of the Cahier. issue #421

Pourquoi il est là. Used by krizaka.com.

Quand l’utiliser

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

Quand ne pas l’utiliser

  • A set of pictures to browse.À la place : Media gallery
  • The birds as numbered figures with their promises.À la place : Bird plate

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { TapedPhoto } from "@krizaka/ui/taped-photo";

Exemples

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.

PropTypeDéfautDescription
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.

Accessibilité

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

Bonnes pratiques

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

Générée depuis le code de @krizaka/ui 3.63.1 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page