sigilUI

Sigil Section

Compose a page band with consistent token-based spacing.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { SigilSection } from "@sigil-ui/components";

Usage

<SigilSection className="border border-dashed border-[var(--s-border)] p-4">A sigil section with token-driven padding</SigilSection>

Structural rhythm

When SigilSection is rendered inside SigilPageGrid, it can snap its outer bottom edge to the next full --s-grid-cell interval from the page-grid content origin. This keeps following Divider bands aligned with the gutter ruler system.

The snap padding is split across top and bottom padding so the section content stays centered in the expanded section. The fractional remainder is applied to bottom padding so the final outer boundary remains exact.

<SigilPageGrid>
  <SigilSection snapBottomToGrid>
    <YourContent />
  </SigilSection>
  <SigilDivider />
</SigilPageGrid>

Use full-cell padding for section boundaries:

<SigilSection
  padding="calc(2 * var(--s-grid-cell)) var(--s-section-padding-x)"
/>

Use fractional cell values only for interior component spacing, not for section outer rhythm.

Props

PropTypeDefaultDescription
idstring——
asElementTypesectionSemantic element type.
borderTopboolean—Show a 1px top border along the section boundary.
borderBottomboolean—Show a 1px bottom border along the section boundary.
showCrossesboolean—Render cross marks at the 4 gutter intersections of each visible border.
paddingstring—CSS padding string. Uses var(--s-section-py) and var(--s-page-margin) by default.
contentMaxnumber—Content max width for standalone mode (outside SigilPageGrid).
railGapnumber—Rail gap for standalone mode (outside SigilPageGrid).
gutterPatternGutterPattern—Gutter pattern for standalone mode.
marginPatternGutterPattern—Margin pattern for standalone mode.
showGutterGridbooleantrueShow gutter grid in standalone mode.
showMarginLinesbooleantrueShow margin lines in standalone mode.
snapBottomToGridbooleantrue inside SigilPageGridAdd vertical snap padding so the section bottom lands on the next full --s-grid-cell interval.

Token integration

CSS VariablePurpose
--s-section-borderSection border
--s-border-width-thinBorder width thin
--s-border-styleBorder style
--s-grid-line-colorGrid line color
--s-border-mutedBorder muted
--s-borderBorder
--s-section-pySection py
--s-page-marginPage margin
--s-backgroundBackground