Skip to content

OrigamListSubheader ​

<OrigamListSubheader> is a labelling element placed inside an OrigamList to visually separate groups of list items. It renders as a <div> by default and supports inset, sticky, border, spacing, color and typography props.

Basic usage ​

vue
<template>
    <OrigamList>
        <OrigamListSubheader title="Section A" />
        <OrigamListItem title="Item one" />
        <OrigamListItem title="Item two" />
    </OrigamList>
</template>

Inset ​

inset adds left padding so the subheader text aligns with inset list items.

vue
<template>
    <OrigamList>
        <OrigamListSubheader inset title="Inset section" />
    </OrigamList>
</template>

Sticky ​

sticky keeps the subheader visible at the top of a scrollable list.

vue
<template>
    <OrigamList style="max-height: 200px; overflow-y: auto;">
        <OrigamListSubheader sticky title="Sticky header" />
        <OrigamListItem v-for="n in 10" :key="n" :title="`Item ${n}`" />
    </OrigamList>
</template>

Typography ​

vue
<template>
    <OrigamListSubheader
        title="Styled header"
        font-size="sm"
        font-weight="semibold"
        line-height="normal"
    />
</template>

Props ​

PropTypeDefaultDescription
titlestring—Subheader text (also available as the default slot)
insetbooleanfalseAdds left-indent padding
stickybooleanfalseSticky positioning within the list
tagstring'div'Root HTML element

Typography props ​

PropTypeDefaultDescription
fontSizeTFontSize—Font-size token (xs · sm · md · lg · xl · 2xl · …). Sets --origam-list-subheader---font-size. When unset the theme default (0.875rem) applies.
fontWeightTFontWeight—Font-weight token (regular · medium · semibold · bold · …). Sets --origam-list-subheader---font-weight. When unset the theme default (400) applies.
lineHeightTLineHeight—Line-height token (none · tight · snug · normal · relaxed · loose). Sets --origam-list-subheader---line-height. When unset the theme default (1.375rem) applies.

Slots ​

SlotScopeDescription
default{ title }Custom subheader content

Tokens ​

VariableDefaultUsed for
--origam-list-subheader---color--origam-color__text---secondarylabel text color
--origam-list__subheader---font-size0.875remlabel font size — this is the themeable name. The component reads var(--origam-list-subheader---font-size, var(--origam-list__subheader---font-size, 0.875rem)); the flat --origam-list-subheader---font-size is not declared in any token sheet and is set only by OrigamList.vue for the nav variant (from --origam-list__subheader---nav-font-size), so overriding it in a theme has no effect.
--origam-list-subheader---font-weight400label font weight
--origam-list-subheader---line-height1.375remlabel line height
--origam-list-subheader---min-height40pxminimum row height
--origam-list-subheader---padding-inline-end16pxright padding
--origam-list-subheader---inset-indent-padding32pxinset left indent