Section

Grouped content with optional title, subtitle, header actions, and a surface variant.

Examples

Properties

PropertyAttributeDescriptionType nameTypeDefault
variantvariantSurface look: `default` (flush), `raised`, or `outline`.DuoSectionVariant"default" | "raised" | "outline""default"
titleSizetitle-sizeTitle typography: `small`, `medium`, or `large` (default `large`).DuoSectionTitleSize"small" | "medium" | "large""large"
titletitleSection heading when the `title` slot is empty.stringstring""
subtitlesubtitleSecondary line under the title.stringstring""

Slots

NameDescription
titleCustom title markup (overrides the `title` attribute).
subtitleCustom subtitle markup (overrides the `subtitle` attribute).
actionsHeader toolbar (e.g. `<duo-button>`).
headerFull header region (overrides built-in title / subtitle / `actions`).
defaultBody content.

Usage

Section groups related content with an optional title, subtitle, header action, and body. Use variant to set visual hierarchy relative to surrounding content.

Variants

VariantLookUse when
defaultNo background, border, or extra paddingThe block is the primary content of a page, view, or modal
raisedRaised surface and paddingSecondary content should separate from the primary area, or a set of peer sections needs distinct surfaces
outlineBorder and padding, no raised fillSecondary content needs a boundary without the emphasis of a raised surface

When there is a clear primary content area, use default for that area. Secondary sections can use raised or outline. When the page is a collection of equal items, use raised, outline, or both — not default on individual items.

Title size

Use title-size for heading typography. Default is large, matching List title-size="large".

ValueTypography
largeExtra-large heading (--duo-font-xl)
mediumLarge heading (--duo-font-l)
smallMedium heading (--duo-font-m)

Do

  • Set title and subtitle (or their slots) when the block needs a visible heading.
  • Use title-size="small", medium, or large to match hierarchy around other headings.
  • Place header controls in the actions slot (for example a ghost Button).
  • Use body-only sections for chips, summary rows, or other grouped content.

Don’t

  • Don’t use Section for elevated cards with media or footer actions — use Card.
  • Don’t use it for page-level layout — prefer Stack or Box.
  • Don’t rely on Section for blocking dialogs — use Modal.

Slots

SlotPurpose
defaultBody content
titleCustom title markup (overrides title)
subtitleCustom subtitle markup (overrides subtitle)
actionsHeader toolbar (e.g. buttons)
headerFull header override