apx-dsv0.1Local renderer · live
K
Foundations4
  • Getting started
  • Theming
  • Templates
  • Icons
  • Avatar
  • Badge
  • DataGrid
  • Scheduler
  • Stat
  • Table
  • Timeline
  • TreeView
  • Accordion
  • Alert
  • EmptyState
  • Progress
  • Skeleton
  • Spinner
  • SplashScreen
  • Toast
  • ColorPicker
  • FileUpload
  • Form
  • Rating
  • TagsInput
  • Combobox
  • Field
  • Select
  • Toggle
  • Button
  • Calendar
  • Checkbox
  • DatePicker
  • Input
  • NumberInput
  • Radio
  • Slider
  • Switch
  • Textarea
  • AppShell
  • Div
  • Divider
  • Marquee
  • Parallax
  • Reveal
  • Section
  • SectionHeading
  • Sidebar
  • Stack
  • Surface
  • Typography
  • Image
  • Breadcrumbs
  • Carousel
  • NavigationMenu
  • Pagination
  • Stepper
  • Tabs
  • Toolbar
  • CommandPalette
  • Confirm
  • Drawer
  • HoverCard
  • Menu
  • Modal
  • Popover
  • Tooltip
  • Icon
  • Card
  • PricingCard
66 componentsapx-ds/renderer
SectionHeading
Variant↳ other

Layout

SectionHeading

The eyebrow / title / body stack that opens a section. Had been hand-written four times across the template gallery, drifting to three different heading sizes; the only genuine difference between the copies was how the eyebrow was drawn, which is now a variant (badge, rule or plain). Deliberately has no onDark prop — the Surface tone says what colour the text is, so a heading never has to ask what it is sitting on. Visual size and heading level are separate props, so a large heading can still tell the truth about the document outline.

Props

PropTypeDefaultDescription
actLikeElementType—Alias of `as`. Provided because the requested API uses `actLike="button"` reading. When both `as` and `actLike` are set, `actLike` wins and a dev warning fires.
alignenum—Text alignment. Defaults to `'start'`.
alignContentAlignContent——
alignItemsAlignItems——
alignSelfAlignSelf——
altstring—Media `alt`.
animateOnViewboolean | ViewportOptions—Defer `animation` until the element scrolls into view, instead of running it on mount. Without this, every animated element on a page finishes its entrance before the user has scrolled to it — so a long marketing page animates entirely off-screen and reads as static. Pass `true` for the DS defaults (`once: true`, `amount: 0.25`, and a `-64px` bottom margin so the reveal starts just before the element reaches the fold), or an object to tune them. Ignored when `animation` is absent, when `asChild` is set, and under reduced motion — where the element renders plain and fully visible rather than waiting for a trigger it will never receive. @example <Div animation="riseIn" animateOnView /> <Div animation="fadeIn" animateOnView={{ once: false, amount: 0.5 }} />
animationenum—Animation preset (`fadeIn`, `scaleIn`, `slideInFromBottom`, `slideInFromTop`, `pressScale`). When set, the element renders through `motion.create(...)` with the matching variant. `useReducedMotion()` short-circuits the wrapper so reduced-motion users get a plain element. Skipped when `asChild` is true.
animationDelaynumber—Seconds to wait before the animation starts. Composes with `stagger` on an ancestor.
animationDurationnumber | "fast" | "normal" | "slow" | "slower" | "deliberate"—Animation length — seconds, or a motion token name (`'fast'` · `'normal'` · `'slow'`). Token names resolve through `@apx-ui/tokens`, so a theme-level motion change reaches here.
animationEasestring—Easing — a token name (`'standard'` · `'emphasized'` · `'decelerate'` · `'accelerate'` · `'linear'`) or any raw CSS easing string.
asElementType—Render element. Defaults to `'div'`.
asChildboolean—Radix-style polymorphism — merges Div's props onto the single child element. Mutually exclusive with `as` / `actLike`; `asChild` wins on conflict (dev warning fires).
aspectRatioAspectRatio——
backdropFilterBackdropFilter——
backgroundBackground<string | number>——
backgroundColorstring | (string & {})——
backgroundImageBackgroundImage——
bgstring | (string & {})——
bodyReactNode—One paragraph under the title. Capped to a readable measure.
bodyToneenum—Palette role for the supporting paragraph. Defaults to `'muted'`.
borderBorder<string | number>——
borderBottomBorderBottom<string | number>——
borderColorstring | (string & {})——
borderLeftBorderLeft<string | number>——
borderRadiusBorderRadius<string | number>——
borderRightBorderRight<string | number>——
borderStyleBorderStyle——
borderTopBorderTop<string | number>——
borderWidthBorderWidth<string | number>——
bottomBottom<string | number>——
boxShadowstring | (string & {})——
boxSizingenum——
centeredboolean—Shortcut for `display: flex; align-items: center; justify-content: center;`. Explicit style props win — if any of the three keys is also supplied, the consumer value is kept.
checkedboolean—Form control `checked`.
classNamestring—Standard className. Appended after the recipe + pseudo classes via `tailwind-merge`.
colorstring | (string & {})——
columnGapColumnGap<string | number>——
cursorCursor——
decorativeboolean—Shortcut for the "decorative overlay" pattern — fills the parent (`position: absolute; inset: 0;`), declines pointer events, and adds `aria-hidden="true"` so screen readers skip the purely visual layer. Compose with `gradient` for the soft backdrop pattern, or use it standalone with a custom `backgroundImage` / `className`.
disabledboolean—Form control `disabled`.
displayDisplay——
displayOnenum—Start hidden, reveal the element at the named breakpoint and above.
downloadstring | boolean—Anchor `download`.
eyebrowReactNode—Short label above the title. Omit it for a bare heading. `ReactNode`, not `string`, and for the same reason `title` and `body` are: an eyebrow is often more than one run of text — a number and a label baseline-aligned, a label with an icon. Typing it as a string forced a template with a decorated eyebrow to keep a whole hand-written copy of this component to express one line of it.
eyebrowColorenum—Palette role for the `badge` eyebrow. Defaults to `'primary'` — **except** that a `primary` chip on a `primary` ground is violet-on-violet, so pass `'neutral'` inside a `<Section tone="primary">` or `<Surface tone="primary">`. It is a prop rather than something the component detects, because the tone is expressed purely in CSS custom properties: `Surface` re-points what the tokens resolve to, and there is nothing in React for a descendant to read. Detecting it would mean a context that the *ground* has to remember to publish — a second source of truth for a fact the CSS already knows, and one that would be wrong for anyone who set the tone vars by hand. `'neutral'` is the right answer on every brand tone, because [#4](/issues/4)'s tone map points the neutral role at the ground's contrast slot.
eyebrowStyleSectionHeadingEyebrowStyle—Fill and shape for the `badge` eyebrow. Ignored by the other two variants. `eyebrowVariant="badge" eyebrowStyle={{ variant: 'solid', shape: 'square' }}` is the filled bar a poster-register template wants.
eyebrowVariantenum—How the eyebrow is drawn. Defaults to `'badge'`.
fgstring | (string & {})——
filterFilter——
flexFlex<string | number>——
flexBasisFlexBasis<string | number>——
flexDirectionenum——
flexGrowFlexGrow——
flexShrinkFlexShrink——
flexWrapenum——
fontFamilyFontFamily——
fontSizeFontSize<string | number>——
fontWeightFontWeight——
gapGap<string | number>——
gradientDivGradient—Theme-aware background gradient — replaces the verbose `className="bg-[radial-gradient(...)]"` recipe with a single typed prop. - `true` → emit a default radial gradient using the active palette (`primary.subtle` → `transparent`, anchored top-left). Tracks the active theme variant for free. - `DivGradientConfig` object → tweak the gradient (`type`, `from`, `to`, `position`, `size`, `fromStop`, `toStop`). `from` / `to` accept palette token paths (`'success.subtle'`) or any raw CSS color. - `string` → escape hatch — used verbatim as `background-image` (drop in any `radial-gradient(...)` / `linear-gradient(...)` / `url(...)`). Sits in the inline style stack just **above** `sx` and just **below** the curated style props, so explicit `backgroundImage` / `background` overrides still win. Often paired with `decorative` for the "soft backdrop" pattern: <Div decorative gradient /> // theme default <Div decorative gradient={{ position: 'top' }} /> // override one field
gridAreaGridArea——
gridAutoColumnsGridAutoColumns<string | number>——
gridAutoFlowGridAutoFlow——
gridAutoRowsGridAutoRows<string | number>——
gridColumnGridColumn——
gridRowGridRow——
gridTemplateColumnsGridTemplateColumns<string | number>——
gridTemplateRowsGridTemplateRows<string | number>——
hHeight<string | number>——
headingIdstring—`id` for the **heading element**, not the wrapper. On the wrapper it would be nearly useless; on the heading it is what a URL fragment lands on, which is why it comes with `scroll-mt` (see the component). A documentation template keys its sidebar, its on-this-page rail and its scroll-spy off this one id — four things that must agree, so there must only be one of them.
heightHeight<string | number>——
hideOnenum—Hide the element at the named breakpoint and above (Tailwind "from upward" semantics).
hrefstring—Anchor `href` — narrow when using `as="a"` / `actLike="a"`.
htmlForstring—Label `htmlFor`.
insetInset<string | number>——
introSectionIntroLike—The whole intro as one object, instead of `eyebrow` / `title` / `body` separately. Templates keep their copy in a content file as exactly this shape, so passing it whole is both shorter at the call site and the thing that makes a CMS-backed section a one-line change. Individual props still win over the corresponding field, so a section can override just the title.
justifyContentJustifyContent——
justifyItemsJustifyItems——
justifySelfJustifySelf——
leftLeft<string | number>——
letterSpacingLetterSpacing<string | number>——
levelenum—Heading level for the document outline, independent of `size`. Defaults to 2. Separate because a visually-large heading is sometimes an `h3`, and forcing size and level to move together means either the page looks wrong or the outline lies to a screen reader.
lineHeightLineHeight<string | number>——
mMargin<string | number>——
marginMargin<string | number>——
marginBlockMarginBlock<string | number>——
marginBottomMarginBottom<string | number>——
marginInlineMarginInline<string | number>——
marginLeftMarginLeft<string | number>——
marginRightMarginRight<string | number>——
marginTopMarginTop<string | number>——
maxHeightMaxHeight<string | number>——
maxWidthMaxWidth<string | number>——
mbMarginBottom<string | number>——
minHeightMinHeight<string | number>——
minWidthMinWidth<string | number>——
mlMarginLeft<string | number>——
mrMarginRight<string | number>——
mtMarginTop<string | number>——
mxMarginInline<string | number>——
myMarginBlock<string | number>——
namestring—Form field `name`.
onActivestring—Tailwind classes applied on `:active` (pressed). e.g. `"scale-[0.98]"`.
onCheckedstring—Tailwind classes applied when `aria-checked="true"`.
onDataStatestring—Tailwind classes applied when `data-state="open"` is present.
onDisabledstring—Tailwind classes applied on `:disabled`. e.g. `"opacity-50 cursor-not-allowed"`.
onFocusVisiblestring—Tailwind classes applied on `:focus-visible` (keyboard focus). e.g. `"ring-2 ring-primary-500"`.
onGroupHoverstring—Tailwind classes applied when a parent `.group` is hovered.
onHoverstring—Tailwind classes applied on `:hover`. e.g. `"bg-primary-100 scale-[1.02]"`.
opacityOpacity——
orderOrder——
overflowOverflow——
overflowXenum——
overflowYenum——
pPadding<string | number>——
paddingPadding<string | number>——
paddingBlockPaddingBlock<string | number>——
paddingBottomPaddingBottom<string | number>——
paddingInlinePaddingInline<string | number>——
paddingLeftPaddingLeft<string | number>——
paddingRightPaddingRight<string | number>——
paddingTopPaddingTop<string | number>——
pbPaddingBottom<string | number>——
plPaddingLeft<string | number>——
placeContentPlaceContent——
placeItemsPlaceItems——
placeSelfPlaceSelf——
pointerEventsenum——
positionenum——
prPaddingRight<string | number>——
ptPaddingTop<string | number>——
pxPaddingInline<string | number>——
pyPaddingBlock<string | number>——
radiusBorderRadius<string | number>——
refRef<HTMLElement>—Ref to the rendered element. Type depends on `as` / `actLike` / `asChild`. Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}
relstring—Anchor `rel`.
rightRight<string | number>——
rowGapRowGap<string | number>——
shadowstring | (string & {})——
sizeenum—Visual size. Defaults to `'section'`.
srcstring—Media `src`.
staggernumber—Cascade descendant `<Div animation="…">` elements instead of firing them together: the number of seconds between each one starting. The children need no extra props — they opt in simply by having an `animation`. Combine with `animateOnView` on this element to make the whole group reveal on scroll as one unit, which is the common case for a card grid or a feature list. @example <Div stagger={0.08} animateOnView> {items.map((i) => <Div key={i.id} animation="riseIn">…</Div>)} </Div>
staggerDelaynumber—Seconds to wait before the first staggered child starts. Requires `stagger`.
styleCSSProperties—Inline style override. Wins over `sx`, curated style props, and the `centered` shortcut.
sxSx—Theme-aware inline style (resolves palette / spacing / radius tokens).
targetstring—Anchor `target`.
textAlignenum——
textDecorationTextDecoration<string | number>——
textOverflowTextOverflow——
textTransformTextTransform——
titleReactNode—The heading itself. Required unless `intro` supplies it.
titleMeasureenum—Measure cap on the heading itself. Defaults to `'none'`. A display-scale heading needs its own cap — at 64px an uncapped line runs to a width nobody can track back from. The body has always been capped; the title was not, and three templates added their own.
titleWeightenum—Weight of the heading. Defaults to `'bold'`. A prop because it is the single most common reason a template kept its own copy of this component: three of the eight run a *lighter* display weight as their identity, and a bold heading is simply the wrong page for them. Set it once per template in `theme.components.SectionHeading.defaultProps` rather than per section.
topTop<string | number>——
transformTransform——
transitionTransition<string & {}>——
typestring—Button `type` — narrow when using `as="button"` / `actLike="button"`.
userSelectenum——
valuestring | number | readonly string[]—Form field `value`.
visibilityenum——
wWidth<string | number>——
whiteSpaceWhiteSpace——
widthWidth<string | number>——
wordBreakenum——
zZIndex——
zIndexZIndex——