Skip to content
Klarhimmel UI

Schedule, spine alternating

Schedule, spine alternating previewSchedule, spine alternating preview

Install

npx shadcn add @klarhimmel/schedule-spine-alternating
DetailsAbout, usage, props and more

A centred heading over a vertical line down the middle, with a dot per entry and cards alternating left and right of it, then centred actions.

Import

Import

import Block from '@/components/klarhimmel/blocks/schedule-spine-alternating';
Also called
  • schedule/spine-alternating
About
A centred heading over a vertical line down the middle, with a dot per entry and cards alternating left and right of it, then centred actions. An entry holds a date, time, name, line, an optional price with ticks and button, and a pill.
Category
What happens when: sessions, classes or events set out as a list or along a line. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it when entries belong in order along one line, a programme, a roadmap or plans told as steps, and the page wants a centred, calm rhythm. For dated cards in a grid with a picture, pick schedule-header-row-list; for a plain vertical list with no centre line, pick steps-timeline.

Writing for it

- Title up to 80 characters, description up to 200, four to six entries is the sweet spot (limit 8). - An entry needs a name up to 60; date and time up to 30, line up to 160, price up to 20, up to 6 ticks of 60. - Leave price, ticks and button empty for a pure schedule; fill them to tell plans down the line.

Watch out for

Cards alternate, so an odd number leaves the last side empty and a very long card pushes its neighbour down; keep lines short and counts even. On a phone every card sits right of the line, so left-first or right-first makes no difference there.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import ScheduleSpineAlternating from '@/components/klarhimmel/blocks/schedule-spine-alternating';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ScheduleSpineAlternating props={{
          "eyebrow": "Section name",
          "title": "Say what the sequence is for",
          "description": "Say in one sentence what the entries have in common.",
          "firstSide": "left",
          "items": [
            {
              "date": "Day and date",
              "time": "Start and end time",
              "title": "Name the first entry",
              "description": "Say in one line what the visitor gets.",
              "price": "",
              "period": "",
              "features": [],
              "cta": {
                "label": "",
                "href": ""
              },
              "badge": "Label"
            },
            {
              "date": "Day and date",
              "time": "Start and end time",
              "title": "Name the second entry",
              "description": "Say in one line what the visitor gets.",
              "price": "",
              "period": "",
              "features": [],
              "cta": {
                "label": "",
                "href": ""
              },
              "badge": "Label"
            }
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
eyebrowstring'Section name'Text, up to 60 characters.
titlestring'Say what the sequence is for'Text, up to 80 characters.
descriptionstring'Say in one sentence what the entrie…'Text, up to 200 characters.
firstSide'left' | 'right''left'One of 'left', 'right'. Optional; empty is not rendered.
textAlign'spine' | 'start'-One of 'spine', 'start'. Optional; empty is not rendered.
items{ date, time, title, description, price, period, features, cta, badge }[]4 itemsList of 1 to 8. Each item: date, time, title, description, price, period, features, cta, badge.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.