Skip to content
D
Documentation

SectionCaptionOptions

reference
1 min readUpdated

Import it from @grafloria/element.

ts
interface SectionCaptionOptions

Properties

NameTypeDefaultDescription
text?stringDefault: the container's title.
subtitle?stringA muted second line; the band grows to 44 px.
description?stringAn ⓘ after the text: tooltip and the section's accessible description.
icon?stringA glyph before the text (emoji or short text).
position?'inside' | 'tab''inside' (default): a band across the top of the frame. 'tab': the same band sized to its text, a label chip at the leading corner. BOTH reserve their height inside the SECTION's own cell — a header that hangs over the neighbour above is the overlap bug this feature exists to end.
align?'start' | 'center' | 'end'Horizontal alignment (default 'start', mirrored on RTL).
valign?'top' | 'center' | 'bottom'Vertical alignment within the band (default 'center').
height?numberBand height, px (default 28; 44 with a subtitle).
font?SectionCaptionFont
padding?number | [number, number]Inside the band: px, or [vertical, horizontal] (default [0, 10]).
margin?number | [number, number]Between the band and the frame: px, or [vertical, horizontal] (default 0). Adds to the reserve.
background?stringBand fill (default: the theme's).
border?stringThe band's bottom rule, a CSS border value (default none).
show?'always' | 'design' | 'hover''always' (default); 'design' is not painted (nor reserved) under static; 'hover' overlays the content, nothing reserved.
actions?SectionCaptionAction[]Buttons at the end of the band; a press fires onCaptionAction and never selects.
passThrough?stringPresses inside descendants matching this selector are content, never the band's.
className?stringYour class on the band.

Was this page helpful?

SectionCaptionOptions — Grafloria