Krizaka UI
Krizaka UI

Goal progress

A pot towards its goal, in money: an arc that fills, “raised of $500” under the amount, the supporters and the time left.

Web · ✓Mobile · ✓Bureau · ✓BêtaGraphiques
Niveau de support
Bêta
Taille
Non mesurée
Qui l'utilise
Aucun produit en production ne l'importe encore
import { GoalProgress } from "@krizaka/charts/goal";

Web et mobile — le même composant pour React et React Native. Bêta : son API peut encore changer à une version mineure.

Pourquoi il est là. Built for a product that left the organisation (2026-10-29): kept until the next major's audit decides: a pot raised towards its goal (PS-C).

Quand l’utiliser

  • A creator's challenge with a goal: what fans pledged so far, on the web and in the app.
  • A crowdfunded request: the amount raised, the supporters, the deadline.

Quand ne pas l’utiliser

  • An allowance that runs out.À la place : Credit usage
  • A value in a range that is not money raised.À la place : Gauge

Installation

Installer

npm install @krizaka/charts

Importer

import { GoalProgress } from "@krizaka/charts/goal";

Exemples

A challenge's pot

A goal halfway there, its supporters and the time left.

Goal reached

Past the goal: the success tone, the amount still counting.

Props

A pot towards its goal, in money: the arc fills, the words say how much of what, and who chipped in.

PropTypeDéfautDescription
currencyrequisstring—The ISO 4217 currency.
goalrequisnumber—The goal, in minor units.
raisedrequisnumber—The amount raised, in **minor units** (cents).
actionsMenuboolean—The ⋯ actions menu of the kit. false: the former “Show data” and export buttons, drawn in line. Default true.
brandBrandId—The brand whose palette the charts use. Without it, a chart follows a .brand-<id> ancestor, else Krizaka. Set it when the app loads a brand stylesheet on :root (@krizaka/tokens/brands/sovkora.css).
classNamestring—A class on the figure (layout: margins, grid placement).
descriptionReactNode—A sentence under the title: the period, the unit, the source.
emptyReactNode—What to show when there is nothing to draw (default: the empty label). An EmptyState of @krizaka /ui fits.
errorReactNode—The data could not be loaded: true says the default words, a node says yours (a retry button…).
heightnumber—The height of the plot in pixels. Default 280 (a sparkline: 32).
hideTitleboolean—Visually hide the title (it stays the chart's accessible name): a card that already has its heading.
idstring—The id of the figure.
insightReactNode—One line that says what the chart shows, between the title and the chart: “100 jobs · +100 % vs last week”.
labelsPartial<GoalLabels>—The words, passed translated; English by default.
liveboolean—Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.
loadingboolean—The data is on its way: a skeleton of the chart, announced once.
localeLocale—The locale of every figure and date ("fr-FR"). Default "en-US".
styleCSSProperties—Inline style on the figure (layout only: colours come from the tokens).
summary"hidden" | "visible"—The written summary: read by screen readers only ("hidden", default), or shown under the chart ("visible").
summaryTextstring—Your own summary instead of the generated one (still read first by screen readers).
supportersnumber—How many people chipped in.
timeLeftReactNode—The time left, written by the app (a Countdown, “2 days”).
titlestring—What the chart shows, in a few words: its accessible name, and its heading unless hideTitle. Inside a ChartCard, the card's title is the default.

Accessibilité

  • The gauge is a meter: the amount and “raised of $500” are its value in words.
  • “Goal reached” is written, never only shown by a colour.

Bonnes pratiques

  • Pass amounts in minor units and the currency.
  • Write the time left with the app's countdown and pass it in timeLeft.
  • Past the goal the amount keeps counting and the arc stays full, in the success tone.

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

Sur cette page