Skip to main content
urbicon ui

Section

Anchored content section with an editorial marker, title, subtitle and badges — the grid every documentation page is built on.

Playground

Playground Section

New

Try different options

Sections compose docs pages with consistent spacing and headings.
Intent
Size
<Section />

01 Examples

Structuring a page

A numbered section

The everyday shape: an editorial marker, a title, a subtitle, and an id the table of contents points at. marker asks for a number and the page hands out the next one; this example's stage counts like a page of its own, so the section here is the first.

01 Customization

slotClasses, preset and unstyled

Section content goes here.

<Section
  id="demo-basic"
  marker
  headingLevel={4}
  title="Customization"
  subtitle="slotClasses, preset and unstyled"
>
  <p class="text-text-secondary text-sm">Section content goes here.</p>
</Section>

A heading level that is not the visual size

headingLevel decides the tag, intent decides the type scale. A subsection can keep h3 semantics and still read as a primary heading — nothing forces breaking the outline to get a size.

Still an h3

Primary type scale, third-level semantics

The outline sees an h3; the reader sees the 24px heading.

<Section
  id="demo-levels"
  headingLevel={3}
  intent="primary"
  title="Still an h3"
  subtitle="Primary type scale, third-level semantics"
>
  <p class="text-text-secondary text-sm">
    The outline sees an <code>h3</code>; the reader sees the 24px heading.
  </p>
</Section>

Badges and a footer

Badges sit beside the title for status that belongs to the whole section; the footer snippet closes it with a note or a link.

Remote mode

beta

Server-side sorting, filtering and pagination.

Requires an endpoint that accepts the query state.

<Section
  id="demo-badges"
  headingLevel={4}
  title="Remote mode"
  badges={[{ text: 'beta', variant: 'soft', intent: 'warning' }]}
>
  <p class="text-text-secondary text-sm">Server-side sorting, filtering and pagination.</p>
  {#snippet footerSnippet()}
    <p class="text-text-tertiary text-sm">
      Requires an endpoint that accepts the query state.
    </p>
  {/snippet}
</Section>

02 Accessibility

Only a titled section is a region

The element is always <section>, but a browser exposes it as a region landmark only once it has an accessible name — so the component points aria-labelledby at the heading it rendered, and omits the attribute entirely when there is no heading to point at. A section carrying only a subtitle or badges is a container, not a landmark, which is the honest answer: an unnamed region is a stop that announces nothing.

Choose the level, not the size

headingLevel sets the tag; intent sets the look. They are separate on purpose: a subsection that needs h3 semantics can still carry the primary type scale, and nothing forces an author to break the outline to get the size they want. Out-of-range levels are clamped to 1–6.

titleHidden keeps the heading, hides the header

A playground stage does not need a visible "Playground" heading, but its table-of-contents entry still has to lead somewhere. titleHidden moves the whole header into the screen-reader layer, so the heading stays in the outline and the section keeps its name. Do not use it to quiet a section that simply has no title yet.

The marker is editorial

It renders as decorative text and is not part of the heading, so a screen reader announces "Examples", not "01 Examples". Nothing reads it back — the numbering is for the eye.

The page counts, not you

With marker the section takes the next number in its page, and its title becomes its entry in the table of contents: the layout lists the titled sections in the order they render. Insert a section and everything after it renumbers itself. A section nested inside a titled one becomes a child entry and takes no number; inside an untitled one it counts as if the wrapper were not there. One shown in a code example or a playground counts within that stage, never in the page.

03 API Reference

20 props
20 props 1 required
Prop
Type
Default
Description

04 Types

3 types
Name
Kind
Category
Used by
Description

05 Installation

Import

import { Section } from '@urbicon-ui/docs';