Skip to content

Band

One band of a landing or a product page, the width of the window: a kicker, a title in the voice, a lead, then what it shows.

import { Band } from '@sypnia/ui/react'

On this page
  1. Words beside what they explain
  2. Three grounds
  3. When to use it
  4. For everyone
  5. Props

Words beside what they explain

A sample

Twelve lines, one case

It reads like the case: who, what it needs and what happens if it fails.

  • A person writes it.
  • The runtime runs it.
place-order.case.yaml
id: place-order
actor: customer
goal: Order for today
Code
import { Band, CodeBlock, Points, useSypnia } from '@sypnia/ui/react';

export default function Split() {
  const es = useSypnia().locale === 'es';
  return (
    <Band kicker={es ? 'Un ejemplo' : 'A sample'} title={es ? 'Doce líneas, un caso' : 'Twelve lines, one case'} size="sm" layout="split"
      lead={es ? 'Se lee como el caso: quién, qué pide y qué pasa si falla.' : 'It reads like the case: who, what it needs and what happens if it fails.'}
      intro={<Points items={es ? ['Lo escribe una persona.', 'Lo ejecuta el runtime.'] : ['A person writes it.', 'The runtime runs it.']} />}>
      <CodeBlock title="place-order.case.yaml" lang="yaml" code={'id: place-order\nactor: customer\ngoal: Order for today'} />
    </Band>
  );
}

Three grounds

On the page

tone plain, the ground of the page.

A step deeper

tone alt, to alternate bands.

Night on any surface

tone night, for the close of a page.

Code
import { Band, useSypnia } from '@sypnia/ui/react';

export default function Tones() {
  const es = useSypnia().locale === 'es';
  return (
    <div>
      <Band title={es ? 'Sobre la página' : 'On the page'} size="sm" lead={es ? 'tone plain, el fondo de la página.' : 'tone plain, the ground of the page.'} />
      <Band tone="alt" title={es ? 'Un paso más hondo' : 'A step deeper'} size="sm" lead={es ? 'tone alt, para alternar bandas.' : 'tone alt, to alternate bands.'} />
      <Band tone="night" title={es ? 'De noche en cualquier superficie' : 'Night on any surface'} size="sm" lead={es ? 'tone night, para el cierre de una página.' : 'tone night, for the close of a page.'} />
    </div>
  );
}

When to use it

Use it when

  • Every section of sypnia.com and the product pages.
  • layout split when the words explain something shown beside them: code, a mock, points.

Do not use it when

  • Console screens: use Section.
  • Two night bands in a row: alternate plain and alt.

For everyone

  • It is a section with its title as a heading (h2 by default, level 3 inside another band).
  • A night band carries data-surface, so every piece inside it takes night's colours and contrast.

Props

BandTypeDefault
id string
intro

More under the lead: a link, points.

ReactNode
kicker ReactNode
layout

`split`: the words beside what it shows (stacked on phones).

"split" | "stack" stack
lead ReactNode
level 2 | 3 2
size "sm" | "md" md
title ReactNode
tone

Its ground: `alt` a step deeper, `night` a night band on any surface.

"alt" | "plain" | "night" plain
  1. Words beside what they explain
  2. Three grounds
  3. When to use it
  4. For everyone
  5. Props

    Search pages, sections and terms