Krizaka UI
Krizaka UI

Globe

The world as a lit 3D sphere — places, great-circle arcs, tinted regions — turning slowly while on screen, dragged by hand, in SVG without WebGL.

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

Web uniquement — React, depuis @krizaka/charts/globe. Bêta : son API peut encore changer à une version mineure.

  • Mobile · n/a. A WebGL globe for a site's hero; a phone shows a map or a list. → Bar chart
  • Bureau · n/a. A public site's page, not a window of the Mac app.

Pourquoi il est là. A 3D globe: heavy, decorative, and the geo map on MapLibre replaces it. Removed with PS-C.

Quand l’utiliser

  • Deployment regions and their replication links, on a product or status page.
  • A global presence told at a glance, with a few places named.

Quand ne pas l’utiliser

  • Values to compare by country (half the globe is hidden).À la place : Geo map
  • More than a dozen places: the far side hides them.À la place : Geo map

Installation

Installer

npm install @krizaka/charts

Importer

import { Globe3D } from "@krizaka/charts/globe";

Exemples

Deployment regions

Sovkora's regions, their health as tones, the replication arcs between them.

Props

The world as a lit sphere: deployment regions, the arcs between them, a slow turn.

PropTypeDéfautDescription
pointsrequisreadonly GlobePoint[]—The places: deployment regions, data centres, audiences.
actionsMenuboolean—The ⋯ actions menu of the kit. false: the former “Show data” and export buttons, drawn in line. Default true.
arcsreadonly GlobeArc[]—Great-circle arcs between places: replication, traffic.
autoRotateboolean—Turn slowly while on screen (never under reduced motion). 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).
centerreadonly [number, number]—The longitude and latitude facing the reader at first. Default: the first point.
classNamestring—A class on the figure (layout: margins, grid placement).
dataTableboolean—“View as table” in the actions menu (the table is in the page for screen readers either way). Default true.
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…).
exportableboolean | readonly ExportFormat[]—The downloads of the actions menu: all three by default, or the formats you want, or false for none.
formatValueFormat—How the points' values are written.
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”.
labelsChartLabelsInput—The words, translated: the buttons, the states, the written summary.
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".
pointLabelstring—The header of the places and of their values in the table.
regionsreadonly string[]—Countries to tint in the accent (ISO alpha-2): where the service is available.
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).
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.
valueLabelstring—The header of the points' values (“Availability”).

Accessibilité

  • The turn runs only while the globe is on screen and the page visible, never under reduced motion, and stops on focus or drag.
  • The summary and the table list every place with its value and coordinates.
  • No WebGL: the sphere is SVG (an orthographic projection), sharp at any size and exportable.

Clavier

TouchesAction
Arrow keysWalk the places: the globe turns to each one, which is announced.
Home / EndJump to the first or the last place.
EscClears the active place; the turn resumes.

Bonnes pratiques

  • Name the places as a reader knows them (“Paris · eu-west-3”); give their status a tone.
  • Keep autoRotate for a showcase; turn it off where the reader works.
  • Use regions for where the service is available, not for values.

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