Krizaka
Documentation

Profile card

A profile at a glance — a portrait, a name, a headline gauge, a few stats with their values in words, a line and actions: a creator, a match, a member, a plan.

Web + MobileBetaData display

Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.

When to use

  • A creator's card in a directory or beside their content (profile completeness, challenges met, response time).
  • A match in a dating app: what two people share, said in words.
  • A team member, a product, a plan presented with a few measured strengths — and, on a told page, a character (variant="arcade").

When not to use

  • A single figure with its trend.Use instead: Stat
  • A usage against a limit with thresholds.Use instead: Meter
  • A plain avatar and a name in a list row.Use instead: Avatar

Installation

Install

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

Styles

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

Import

import { ProfileCard, StatGauge } from "@krizaka/ui/profile-card";

Examples

A creator

A creator's card: profile completeness, two stats in words, follow and message.

Elena Marchetti

Dance and street fashion · Montréal

A match

In a dating app's brand: what two people share, never a score alone.

Alex, 29

You both answered “a slow Sunday market” first.

Arcade flavour

The fighter card of a told page: the brand's gradient, a breathing aura, a skewed gauge.

Mirror clan

ōrāre + zaka

Props

ProfileCard

A profile at a glance: portrait, name, a headline gauge, stats with their values in words, a line and actions.

PropTypeDefaultDescription
namerequiredReactNode—The name (the card's heading).
visualrequiredReactNode—The portrait: an image, an avatar, a mark. Decorative — the name carries the meaning.
brandstring—A brand scope (orochia → .brand-orochia): the accent and gradient become that brand's.
captionReactNode—One line under the gauges: where they come from, what they do.
figureReactNode—What shows as the headline figure instead of valueText: a NumberTicker that climbs. Decorative.
iconReactNode—A small glyph before the name (decorative): a verified mark, an emblem.
nameAs"h2" | "h3" | "h4" | "p"h3The level of the name.
statLabelstring—The headline gauge's label (“Profile complete”, arcade “Power”); without it, no headline gauge.
statsreadonly ProfileStat[]—More gauges under the headline one: two to four, each with its value in words.
valuenumber100The headline gauge's value, 0–100.
valueTextstring—The headline value in words; default: the percentage.
variantStoryVariantdefaultdefault: a sober card. arcade: the fighter card — the brand's light, a ring and a breathing aura, a skewed gauge.
visualSizenumber132 (arcade 196)The diameter of the portrait, in pixels.

StatGauge

A measured strength: label, figure and bar; role="meter" with aria-valuetext.

PropTypeDefaultDescription
labelrequiredstring—What it measures (“Profile complete”, “Creator share”) — passed translated; the meter's accessible name.
figureReactNode—What shows as the figure instead of valueText: a NumberTicker that climbs, a formatted amount. Decorative.
hideLabelbooleanfalseHides the label and the figure (the bar alone, named for assistive technology).
maxnumber100The top of the range.
valuenumber100The value, between 0 and max.
valueTextstring—The value in words (“12 of 15”); default: the percentage. Read by assistive technology, shown without figure.

Accessibility

  • An article headed by the name; each gauge is a meter named by its label, with aria-valuetext.
  • The portrait is decorative: the name carries the meaning.
  • In a stage, the card arrives and its gauges fill once; under prefers-reduced-motion they are drawn full at once.

Best practices

  • Two to four stats, each with valueText in the person's words (“12 of 15”, “replies within a day”): a bar alone says nothing.
  • Never reduce a person to a score: in a dating or social product, show what is shared, not a ranking.
  • One or two actions under the card, the main one first.
  • nameAs follows the page's outline: h3 in a list under an h2, p when a heading follows the card.

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

On this page