docs/components/layout/Section

Section

Labeled page section with a heading.

import { Section } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
bg'default' | 'muted' | 'accent' | 'gradient''default'Background variant
py'sm' | 'md' | 'lg' | 'xl''lg'Vertical padding size
maxWidthstring'1200px'Maximum width of inner content
fullBleedbooleanfalseRemove inner container constraint (full-width content)
children *JSX.ElementContent to render inside the section
classstringAdditional CSS classes
styleJSX.CSSPropertiesInline styles
asstring'section'HTML element to render as

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-bg-secondary
  • --sk-bg-tertiary
  • --sk-section-max-width
  • --sk-section-px
  • --sk-section-py-lg
  • --sk-section-py-md
  • --sk-section-py-sm
  • --sk-section-py-xl
  • --sk-space-lg
  • --sk-space-md
  • --sk-space-xl