Skip to main content

Configure the following properties on the Section component.

Anchor to heading
heading
string

A title that describes the content of the section. If omitted and no secondary actions are provided, the section will be rendered without a header.

string

A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features.

The section component supports slots for additional content placement within the section. Learn more about using slots.

Anchor to secondary-actions
secondary-actions
HTMLElement

A button element to display in the section heading. Only a single button is supported. Use the slot="secondary-actions" attribute to place action elements that relate to the entire section's content.


Group related content using a section component. This example shows a basic section with a heading and content area.

Group related content into sections

Group related content using a section component. This example shows a basic section with a heading and content area.

Group related content into sections

<s-section heading="Select product category">
<s-button slot="secondary-actions">Edit</s-button>
<s-choice-list>
<s-choice value="snowboards">Snowboards</s-choice>
<s-choice value="jackets">Jackets</s-choice>
<s-choice value="label">Label</s-choice>
</s-choice-list>
</s-section>

  • Write descriptive headings: Provide clear heading text that represents the section's content.
  • Let heading levels adjust automatically: Nested sections automatically adjust heading levels for proper semantic structure.
  • Place relevant secondary actions: Use the secondary-actions slot for actions that apply to the entire section, like "Edit Settings" or "Add Item."

Was this page helpful?