ListSubheader

Data Display
stable

Section heading rendered inside a List. Supports inset indent and sticky positioning.

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

inset

Rendu de l’aperçu en cours…

sticky

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamListSubheaderSchematic of the ListSubheader component with 2 numbered internal parts. __text (label) 1 2 origam-list-subheader --inset adds 32px indent-padding · --sticky sets position: sticky top: 0
Anatomy of <origam-list-subheader> — 2 internal parts. The root ① is a flex container; the inner text element ② truncates with ellipsis.
1.origam-list-subheader
Root element. Flex container (align-items: center). Renders as <div> by default; use tag="h2"–"h6" for semantic sectioning.
2.origam-list-subheader__text
Label text wrapper. overflow: hidden; text-overflow: ellipsis; white-space: nowrap. Rendered only when the title prop or default slot is provided.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

inset
boolean
false
Adds an indent (32px) to align with list items that have a prepend icon/avatar.
sticky
boolean
false
Makes the subheader stick to the top of the scrollable list container (position: sticky; top: 0).
title
string
Subheader label text. Can also be provided via the default slot.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
Root HTML element. Consider using a semantic heading tag (h2–h6) when appropriate.
color
Text color override. Defaults to the semantic secondary text color.
bgColor
Background color override. Inherits the list background by default.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the subheader element.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
Border-radius token or boolean applied to the subheader.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Subheader label content. Receives the title prop as a slot binding. Overrides the title prop when provided.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle from the computed listSubheaderStyles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Text color of the subheader label. Defaults to the semantic secondary text color.
Font size of the subheader label.
Font weight of the subheader label.
Minimum height of the subheader row. Transitions with density changes.
Trailing padding to avoid text running to the edge.
Line height of the subheader text.
Indent padding applied when --inset modifier is active. Aligns the label with prepend icons.
Duration of the min-height transition.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Notes

  • For screen-reader accessibility, consider using tag="h2" through "h6" so the subheader is part of the heading outline. The default <div> tag is appropriate when the list is not a standalone section.
  • The sticky variant uses position: sticky; top: 0 — the parent list must have overflow: auto or overflow: scroll for this to work correctly.
  • The default secondary text color may have reduced contrast. Ensure at least 4.5:1 contrast ratio when customising the color prop.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
var(--origam-color__text---secondary)
Default text color (secondary).
dimension
var(--origam-font__size---md)
Font size (0.875rem).
dimension
40px
Minimum row height.
dimension
32px
Indent applied in --inset mode to align with prepend icon items.
duration
var(--origam-motion__duration---medium)
Transition duration for min-height changes.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic subheader

vue

Inset + sticky

vue