Docs
Next

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.

Components with the default tokens
NewComponents

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/next

In a React app without Next.js, install @systhemaui/react instead:

pnpm add @systhemaui/core @systhemaui/react

The 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.

ProviderLink to this section

ComponentWhat it is
SysthemaProviderThe root provider: config forwarding, the scroll listeners and the cookie banner.

LayoutLink to this section

ComponentWhat it is
ArticleA page-level article wrapper with theme, background and article padding.
SectionA themed band with section padding around the container.
ColumnsResponsive column layouts with alignment, dividers, sticky columns and stagger.
StackFlex rows and columns with token gaps, dividers and mobile overrides.
FeatureA media-and-content band, reversible, with FeatureMedia and FeatureContent.
FigureFigures that break out to the container, the screen or the card edges.
SeparatorA themed horizontal rule.

Page chromeLink to this section

ComponentWhat it is
HeaderA static, sticky or fixed header with navigation, sub-navigation and a mobile menu.
FooterSimple and advanced footers with navigation groups, social links and a copyright line.
HeroHeroSimple, HeroBackground and HeroFeature page openers.

TypographyLink to this section

ComponentWhat it is
HeadingHeading.h1 to Heading.h6 in the token text styles.
ParagraphBody, lead, small and label paragraphs.
LinkText links with same-page hash scrolling and new-tab cues.
ListBullet, number and check lists, and CustomList with your own markers.
QuoteBlockquotes with icon, citation, avatar and labels.

ActionsLink to this section

ComponentWhat it is
ButtonToken-variant buttons as a button, link or div, with title and icon parts.
ChipSmall labels, tags and filter chips.
IconDecorative and linked icons, with an optional background.

MediaLink to this section

ComponentWhat it is
ImageImages cropped to an aspect ratio, with object fit and parallax.
VideoVideos with deferred controls, preload and parallax.
MediaWrapperA play affordance and overlays around an image or video.
AvatarRound profile images.
GalleryA Swiper gallery with navigation and a slide counter.
CarouselA carousel with pagination, navigation and thumbnails.

ContentLink to this section

ComponentWhat it is
CardToken-variant cards as a container or a whole-card link.
AccordionDisclosure panels with an animated open state.

FormsLink to this section

ComponentWhat it is
FormThe form wrapper and the FormRow and FormGroup layout.
Form controlsLabel, input, textarea, file input, description and error primitives.
SelectA native select with a placeholder and a token icon.
Radios and checkboxesSingle radio and checkbox controls.
Form fieldsEleven labelled fields with descriptions, errors and widths.
SearchFieldA search input with a trailing magnifier.

PostsLink to this section

ComponentWhat it is
PostsListThe posts listing in grid, row and lead layouts, with paging.
PostCard and HighlightCardListing cards and highlight cards.
PostMetaThe author and date byline.
ShareButtonsShare links as pills, a floating sidebar or a sticky bar.
ArchiveSearchFilterSearch and category or tag filters for archives.
Posts view model and helpersPostView, part resolution and the listing helpers.

BehaviourLink to this section

ComponentWhat it is
ListenersScroll reveals, parallax and scroll-state classes.
CookieConsentBannerThe cookie consent banner and preferences modal.

UtilitiesLink to this section

ComponentWhat it is
Utilitiescn, 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:

  1. a CSS class, <component>-<variant> (button-primary, card-highlighted), whose rules read that variant's token variables;
  2. a member of the matching TypeScript union in the generated types (ButtonVariant, CardVariant), so an unknown variant is a type error;
  3. 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:

TypeValuesUsed by
ColorSystemdefault, darktheme on sections, cards, heroes and more
LayoutBackgroundmain, alternativelayoutBackground on sections and bands
ButtonVariantprimary, secondaryButton
CardVariantdefault, highlightedCard
AccordionVariantdefaultAccordion
GapSizenone, xs, sm, md, lg, xl, 2xl, 3xlgap on Stack and Columns
Variants side by side
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.