Antithesis Design System. Portable UI components built on web components with JSX wrappers for React and Preact.

Install

Terminal window
npm install @antadesign/anta

Quick start

import { Progress } from '@antadesign/anta'
import '@antadesign/anta/elements' // registers <a-progress> custom element
<Progress value={60} />
<Progress value={42} label="Uploading files..." hint="3 of 7" />
<Progress value={75} tone="info" label="Processing" />

Components

Progress

A progress indicator with an optional label area.

PropTypeDefaultDescription
valuenumberCurrent progress value (required)
maxnumber100Upper bound of the range
tone'neutral' | 'info''neutral'Color variant
labelstringText label after the percentage
hintstringRight-aligned hint text
classNamestringCSS class on the root element
childrenReactNodeCustom content replacing the default label

Component tokens (CSS custom properties for theming):

TokenDescription
--progress-indicator-bgIndicator bar fill color
--progress-indicator-edgeGradient at the indicator’s leading edge
--progress-label-colorPercentage number color

Registering elements

The JSX wrappers render <a-progress> and other custom elements. These must be registered before they appear in the DOM:

import '@antadesign/anta/elements' // auto-registers all elements

In SSR environments (Astro, Next.js), this import must run client-side onlyHTMLElement does not exist in Node.js:

// Astro: <script> tags are client-side by default
<script>
import '@antadesign/anta/elements'
</script>
// React/Preact: dynamic import in useEffect
useEffect(() => { import('@antadesign/anta/elements') }, [])

Framework setup

React

Works out of the box.

Preact with compat

If your bundler aliases reactpreact/compat, anta works automatically — no extra setup.

Preact without compat

Call configure() before rendering any anta components:

import { configure } from '@antadesign/anta'
import { h, Fragment } from 'preact'
configure(h, Fragment)

Raw web components (no JSX)

<link rel="stylesheet" href="@antadesign/anta/elements/a-progress.css">
<script type="module">
import '@antadesign/anta/elements'
</script>
<a-progress value="42" max="100" tone="info"></a-progress>

Dark mode

Add the dark class to any ancestor element:

<div class="dark">
<Progress value={50} />
</div>