Components
Every React and Next.js component in Systhema, how to install and import them, and how your tokens decide their variants.
On this page
Systhema's components are React components styled by the CSS that @systhemaui/core generates from your design tokens. @systhemaui/react works in any React app; @systhemaui/next re-exports it and swaps in Next.js versions where next/link, next/image or next/navigation help. Every page in this section shows the component live, rendered with the default tokens.
Build from tokens
Change a color or a radius in Figma, sync, and every component follows.
import { Button, Card, Chip, Heading, Paragraph, Stack } from '@systhemaui/next'
export default function Demo() {
return (
<Card style={{ maxWidth: 480 }}>
<Stack gap="xs">
<Chip>New</Chip>
<Chip>Components</Chip>
</Stack>
<Heading.h3>Build from tokens</Heading.h3>
<Paragraph>Change a color or a radius in Figma, sync, and every component follows.</Paragraph>
<Stack gap="sm">
<Button.a href="#gallery" variant="primary">
Browse
</Button.a>
<Button.a href="#token-driven-variants" variant="secondary">
About variants
</Button.a>
</Stack>
</Card>
)
}InstallationLink to this section
In a Next.js app, install @systhemaui/next with core:
pnpm add @systhemaui/core @systhemaui/nextIn a React app without Next.js, install @systhemaui/react instead:
pnpm add @systhemaui/core @systhemaui/reactThe packages come from the private GitHub Packages registry; see Registry access. The components also need the Tailwind CSS plugin and packages.react in systhema.config.ts, so their classes are generated; see Installation and Next.js.
Importing componentsLink to this section
Every page in this section imports from @systhemaui/next, as a Next.js project would:
import { Button, Heading, Section } from '@systhemaui/next'In a React app, import the same names from @systhemaui/react. Where @systhemaui/next ships its own implementation, the component page has a "Next.js" section that says what changes. A few low-level helpers exist in @systhemaui/react only; Utilities lists them.
Most components are server-safe and render in a Server Component. The interactive ones (Accordion, Gallery, Carousel, Header, the listeners, the cookie banner) are client components that you render from a Server Component as they are.
GalleryLink to this section
ProviderLink to this section
| Component | What it is |
|---|---|
| SysthemaProvider | The root provider: config forwarding, the scroll listeners and the cookie banner. |
LayoutLink to this section
| Component | What it is |
|---|---|
| Article | A page-level article wrapper with theme, background and article padding. |
| Section | A themed band with section padding around the container. |
| Columns | Responsive column layouts with alignment, dividers, sticky columns and stagger. |
| Stack | Flex rows and columns with token gaps, dividers and mobile overrides. |
| Feature | A media-and-content band, reversible, with FeatureMedia and FeatureContent. |
| Figure | Figures that break out to the container, the screen or the card edges. |
| Separator | A themed horizontal rule. |
Page chromeLink to this section
| Component | What it is |
|---|---|
| Header | A static, sticky or fixed header with navigation, sub-navigation and a mobile menu. |
| Footer | Simple and advanced footers with navigation groups, social links and a copyright line. |
| Hero | HeroSimple, HeroBackground and HeroFeature page openers. |
TypographyLink to this section
| Component | What it is |
|---|---|
| Heading | Heading.h1 to Heading.h6 in the token text styles. |
| Paragraph | Body, lead, small and label paragraphs. |
| Link | Text links with same-page hash scrolling and new-tab cues. |
| List | Bullet, number and check lists, and CustomList with your own markers. |
| Quote | Blockquotes with icon, citation, avatar and labels. |
ActionsLink to this section
| Component | What it is |
|---|---|
| Button | Token-variant buttons as a button, link or div, with title and icon parts. |
| Chip | Small labels, tags and filter chips. |
| Icon | Decorative and linked icons, with an optional background. |
MediaLink to this section
| Component | What it is |
|---|---|
| Image | Images cropped to an aspect ratio, with object fit and parallax. |
| Video | Videos with deferred controls, preload and parallax. |
| MediaWrapper | A play affordance and overlays around an image or video. |
| Avatar | Round profile images. |
| Gallery | A Swiper gallery with navigation and a slide counter. |
| Carousel | A carousel with pagination, navigation and thumbnails. |
ContentLink to this section
| Component | What it is |
|---|---|
| Card | Token-variant cards as a container or a whole-card link. |
| Accordion | Disclosure panels with an animated open state. |
FormsLink to this section
| Component | What it is |
|---|---|
| Form | The form wrapper and the FormRow and FormGroup layout. |
| Form controls | Label, input, textarea, file input, description and error primitives. |
| Select | A native select with a placeholder and a token icon. |
| Radios and checkboxes | Single radio and checkbox controls. |
| Form fields | Eleven labelled fields with descriptions, errors and widths. |
| SearchField | A search input with a trailing magnifier. |
PostsLink to this section
| Component | What it is |
|---|---|
| PostsList | The posts listing in grid, row and lead layouts, with paging. |
| PostCard and HighlightCard | Listing cards and highlight cards. |
| PostMeta | The author and date byline. |
| ShareButtons | Share links as pills, a floating sidebar or a sticky bar. |
| ArchiveSearchFilter | Search and category or tag filters for archives. |
| Posts view model and helpers | PostView, part resolution and the listing helpers. |
BehaviourLink to this section
| Component | What it is |
|---|---|
| Listeners | Scroll reveals, parallax and scroll-state classes. |
| CookieConsentBanner | The cookie consent banner and preferences modal. |
UtilitiesLink to this section
| Component | What it is |
|---|---|
| Utilities | cn, LinkHelper, getReactConfig, withTagProxy and the other helpers. |
Token-driven variantsLink to this section
Props such as variant, theme and layoutBackground take values from your project's tokens, not from a fixed list in the code. The token export names the variants (for example the keys under button in the responsiveSizing and colorSystem collections), and systhema-core sync turns each one into three things:
- a CSS class,
<component>-<variant>(button-primary,card-highlighted), whose rules read that variant's token variables; - a member of the matching TypeScript union in the generated types (
ButtonVariant,CardVariant), so an unknown variant is a type error; - an entry in the client token snapshot, which the component reads at render time to pick the class.
So adding a tertiary button in Figma and syncing gives you variant="tertiary", typed and styled, without touching component code. Omitting variant picks the first variant in the tokens. theme works the same way with the color-system modes: it sets data-theme, and the token variables of that mode apply inside the element.
With the default Systhema tokens, the unions are:
| Type | Values | Used by |
|---|---|---|
ColorSystem | default, dark | theme on sections, cards, heroes and more |
LayoutBackground | main, alternative | layoutBackground on sections and bands |
ButtonVariant | primary, secondary | Button |
CardVariant | default, highlighted | Card |
AccordionVariant | default | Accordion |
GapSize | none, xs, sm, md, lg, xl, 2xl, 3xl | gap on Stack and Columns |
default
CardVariant
highlighted
CardVariant
import { Button, Card, Column, Columns, Heading, Paragraph, Stack } from '@systhemaui/next'
export default function Demo() {
return (
<Stack direction="col" gap="md" style={{ width: '100%' }}>
<Stack gap="sm">
<Button.button variant="primary">primary</Button.button>
<Button.button variant="secondary">secondary</Button.button>
</Stack>
<Columns columns={2} gap="md">
<Column>
<Card variant="default">
<Heading.h5>default</Heading.h5>
<Paragraph type="small">CardVariant</Paragraph>
</Card>
</Column>
<Column>
<Card variant="highlighted">
<Heading.h5>highlighted</Heading.h5>
<Paragraph type="small">CardVariant</Paragraph>
</Card>
</Column>
</Columns>
</Stack>
)
}See Design tokens for how tokens flow from Figma to CSS, and Themes and backgrounds for how theme and layoutBackground nest.
AccessibilityLink to this section
The components are held to WCAG 2.2 for semantics, ARIA, keyboard use, forms, media and motion; contrast and target sizes depend on your tokens. Each page has an "Accessibility" section, and Accessibility sums up what the system guarantees.
RelatedLink to this section
- Next.js integration
- Styling
- Payload blocks, which render these components