Skip to content

Gallery — visual + functional catalogue

An interactive demo of every SDK component and feature. Runs as a Vite + React app in examples/gallery.

The gallery is a real Vite + React app that consumes the SDK exactly the way a production app would — via an npm install pointing at file:../... It stands in for Storybook: each section mounts components with varied props, exercises hooks live (SSE, toast, pagination) and acts as a visual test bench whenever you touch styles or layout. If a component looks right in the gallery, it looks right in consumer apps.

How to run

# repo root
npm install
npm run build           # generates the SDK's dist/

cd examples/gallery
npm install
npm run dev             # http://127.0.0.1:5173

tempest-react-sdk is consumed via file:../.. — any rebuild from the root shows up in the gallery after a reload.

Run the root npm run dev in parallel

The gallery serves the SDK's dist/. To see SDK changes instantly, keep an npm run dev (vite build --watch) running at the root in one tab and the gallery's npm run dev in another — each rebuild reloads the page.

Validate UI at both breakpoints

The gallery is where you check responsiveness: resize to ≤ 430px (mobile) and ≥ 1024px (desktop) before calling a visual change done. Stack/Grid/Modal/ Drawer/Table all have responsive behavior here.

Captures in the documentation pages

Every gallery section has a versioned capture under docs/assets/gallery/, and that is what shows up on the component pages. Two commands keep it current:

npm run e2e:build          # build the SDK and the gallery (prerequisite)
npm run docs:shots         # capture one image per section
npm run docs:gallery       # place the images into the .md pages

docs:shots serves the gallery's production build, walks every section.gallery-section[id] and writes docs/assets/gallery/<id>.webp. The sections where the theme is the point also get an <id>.dark.webp.

Re-running does not dirty the diff

A file is only written when its bytes change. On an untouched gallery a second run leaves git status clean — a diff shows up only when the component actually changed.

Why versioned WebP instead of a build artifact

The image has to render on the MkDocs site and in the .md as GitHub renders it. An artifact produced only at publish time satisfies the first and leaves the second with a broken image. WebP halves the bytes against PNG and is encoded by Playwright's own Chromium, with no new dependency.

docs:gallery inserts a marked block (<!-- gallery:<id> -->) under the first component of each section across docs/components/, in both languages. Pass --check to fail without writing — that is what the docs guard uses.

Sections

Each section is a file under examples/gallery/src/sections/ and every example is wrapped by the <Example> helper (demo + code + copy button).

# Section Anchor Group
1 Buttons #buttons Componentes
2 Layout (AppShell · Page · Container) #layout Componentes
3 Footer #footer Componentes
4 Navbar · Sidebar · Bottom nav #nav-extra Componentes
5 Inputs avançados (Date · Pin · Slider) #inputs-extra Componentes
6 Alert · Timeline · BottomSheet #feedback-extra Componentes
7 Headless & render-props #headless Componentes
8 Form fields #form-fields Componentes
9 Checkbox · Radio · Switch #form-primitives Componentes
10 Toggle · Rating · Range · Combobox #inputs-advanced Componentes
11 Badges · Cards · Skeleton #feedback Componentes
12 Stat · Tag · Money · Banner #data-display Componentes
13 Avatar · Image · Carousel #display-media Componentes
14 Modal & Toast #modal Componentes
15 Popover · Dropdown · HoverCard #overlays Componentes
16 Accordion · Collapsible · Scroll #disclosure Componentes
17 AppBar · Tabs · Tooltip · Drawer #navigation Componentes
18 Stepper · Progress · VirtualList #advanced Componentes
19 TreeView · Wizard #hierarchy-flow Componentes
20 SignaturePad · Lightbox · AvatarGroup #capture-media Componentes
21 ImageCropper (recorte) #image-cropper Componentes
22 Table & Pagination #table Componentes
23 DataTable #data-table Componentes
24 VirtualTable (40k linhas) #virtual-table Componentes
25 Scheduler (agenda) #scheduler Componentes
26 BarList (distribuição ranqueada) #bar-list Componentes
27 Sparkline (mini-gráfico inline) #sparkline Componentes
28 QRCode #qrcode Componentes
29 Chat #chat Componentes
30 AIChat #aichat Componentes
31 Mesh WebRTC (createPeerMesh) #peer-mesh Componentes
32 Cadeia de voz (microfone) #voice-chain Componentes
33 VideoPlayer #video-player Componentes
34 Áudio (gravação) #audio-capture Componentes
35 Captura de dispositivo #device-capture Componentes
36 Dashboard (CSS) #dashboard-layout Componentes
37 FilterBar & FilterPanel #filterbar Componentes
38 Markdown #markdown Componentes
39 Masonry #masonry Componentes
40 Reveal #reveal Componentes
41 Tour #tour Componentes
42 Transfer #transfer Componentes
43 CodeBlock #codeblock Componentes
44 Material (ListTile · FAB · Rail) #material Componentes
45 Forms (zod) #forms Componentes
46 Telas de autenticação #auth-screens Componentes
47 BR Forms (CPF/CNPJ/CEP) #br-forms Componentes
48 Hooks — estado #hooks-state Hooks
49 Hooks — DOM & timing #hooks-dom Hooks
50 Network · Clipboard · Share #meta Hooks
51 Formatters #utils Hooks
52 HTTP client #recipe-http Receitas
53 Upload resumível (tus) #recipe-resumable-upload Receitas
54 Passkeys (WebAuthn) #recipe-passkeys Receitas
55 Data fetching (TanStack Query) #recipe-query Receitas
56 Tempo real (WebSocket) #recipe-realtime Receitas
57 Geolocalização (mapas & trajetória) #geo Receitas
58 Mapa do Brasil (UF + cidades) #brazil-map Receitas
59 Pagamentos BR (Pix · boleto · NFe) #br-payments Receitas
60 Checkout (Pix e cartão · Mercado Pago) #payments-checkout Receitas
61 Auth & Access Control #recipe-auth Receitas
62 SSE · Push · Audio #integrations Receitas
63 NotificationCenter (inbox) #notification-center Receitas
64 PWA: Install · Push #pwa Receitas
65 Desempenho: etapas · CPU · bateria #perf Receitas
66 Store (Zustand) #foundation Fundação
67 Escalas contínuas (heatmap) #dataviz-scales Fundação
68 createTheme · presets · tokens de gráfico #theme-factory Fundação
69 Ícones por slug (/icons) #icons Fundação
70 utilities.css (camada opt-in) #utilities-css Fundação
71 Tema + i18n #theme-i18n Fundação

Variant matrix

Button

Prop Values
variant primary · secondary · danger · ghost
size sm · md · lg
Flags loading, fullWidth, disabled
Slots leftIcon, rightIcon

Badge

variant Typical use
neutral Generic tag
success Paid, active, online
warning Pending, degraded
danger Failure, blocked
info In review, beta
Prop Values
size sm · md · lg · xl
Flags closeOnBackdrop, closeOnEsc, hideCloseButton
Slots title, children (body), footer

Toast (via useToast)

Method Variant
toast.success(text) success
toast.error(text) error
toast.warning(text) warning
toast.info(text) info
toast.show({ title, description, variant, duration }) custom

Table

Column (TableColumn<T>) Description
key unique identifier
header header label
render(row, i) custom cell; default row[key]
align left · right · center
width string or number

Spinner / Skeleton

Spinner size Skeleton variant
sm · md · lg rect · text · circle

Theme modes

Mode Behavior
light forces light, ignores OS
dark forces dark, ignores OS
system listens to prefers-color-scheme, updates in real time

Screenshots

Every example sits next to its source code (with a "Copy" button), so the gallery doubles as a copy-paste reference. Captures of the running app:

Every section has its own capture next to the component it documents; the pairs below are the ones where the theme is the point. All 81 images are regenerated by npm run docs:shots.

Buttons

Buttons — light

Buttons — dark

Badges · Cards · Skeleton

Badges · Cards · Skeleton — light

Badges · Cards · Skeleton — dark

Stat · Tag · Money · Banner

Stat · Tag · Money · Banner — light

Stat · Tag · Money · Banner — dark

Popover · Dropdown · HoverCard

Popover · Dropdown · HoverCard — light

Popover · Dropdown · HoverCard — dark

DataTable

DataTable — light

DataTable — dark

Dashboard (CSS)

Dashboard (CSS) — light

Dashboard (CSS) — dark

CodeBlock

CodeBlock — light

CodeBlock — dark

Store (Zustand)

Store (Zustand) — light

Store (Zustand) — dark

createTheme · presets · tokens de gráfico

createTheme · presets · tokens de gráfico — light

createTheme · presets · tokens de gráfico — dark

Tema + i18n

Tema + i18n — light

Tema + i18n — dark

Recap

  • The gallery is a real Vite + React app that consumes the SDK via file:../.. — it plays the role of Storybook.
  • Run it with npm run build at the root, then npm run dev in examples/gallery (port 5173).
  • 71 sections cover components, overlays, media/images, advanced inputs, DataTable, store, theme/i18n, live integrations, PWA and utils — each example with copy-paste code next to it. The table above is generated from the registry, so it cannot go stale.
  • Every section has a versioned capture under docs/assets/gallery/, refreshed by npm run docs:shots and placed into the pages by npm run docs:gallery.
  • Use it to validate UI at the mobile and desktop breakpoints before closing out a visual change.

See also