Krizaka UI
Krizaka UI
Composants

Upload queue

A queue of files that stays on screen: each row appears at once, says in words what it is doing, shows live progress while it works, and ends in a result chip; a non-blocking tray holds it.

Web · ✓Mobile · ✗ à construireBureau · ✓BêtaRetours
import { UploadQueue, TaskTray, QueueStatus, tally } from "@krizaka/ui/upload-queue";

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

  • Mobile · ✗ à construire. The Expo apps get the same queue on @krizaka/ui/native. issue #511

Pourquoi il est là. Used by Yomizaka.

Quand l’utiliser

  • Several files are checked, encoded or imported at once and the user keeps browsing.
  • Progress comes from live events (Orazaka's run events): the row shows their words.

Quand ne pas l’utiliser

  • One file in a form, with its own progress.À la place : File upload
  • A task whose progress is a single percentage.À la place : Progress

Installation

Installer

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

Styles

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

Importer

import { UploadQueue, TaskTray, QueueStatus, tally } from "@krizaka/ui/upload-queue";

Exemples

Queue

Checking, reading, done and failed rows.

Tray

The non-blocking tray that folds away.

Props

TaskTray

A non-blocking tray for a queue: the user keeps browsing. Bottom edge on a phone, bottom-right from sm.

PropTypeDéfautDescription
openLabelrequisstring—… and while folded (“Show”).
summaryrequisstring—The tally in words (“1 running · 2 done”).
titlerequisstring—The tray's name (“Checks”).
toggleLabelrequisstring—The fold button's name while open (“Collapse”).
defaultOpenbooleantrueStarts open.

UploadQueue

The files being checked, one row each. Changes are announced politely.

PropTypeDéfautDescription
itemsrequisreadonly UploadQueueItem[]—The rows, in the order they were added.
labelrequisstring—The list's accessible name (“Checks in progress”) — passed translated.

Accessibilité

  • The list is named by label and announced politely.
  • A working row's progress is a progressbar named by the file.
  • Failures are said in words, never by colour alone.

Clavier

TouchesAction
Enter / SpaceFolds or opens the tray.

Bonnes pratiques

  • Show the row at once (optimistic), then update it from the events: queued, reading, checking, done, failed.
  • Say what it does in words (statusText, translated): a bare spinner says nothing.
  • Put the result in result (a chip) and one quiet action in trailing (keep, retry).
  • Only working rows move: the shimmer and the live progress stop with the work; reduced motion stops them.
  • TaskTray is the container: a sheet on a phone, bottom-right from sm.

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