Surfaces
Container styles for grouping related content with visual hierarchy.
Default surface
Surface
Default surface component with a subtle background and padding.
Highlighted surface
Surface highlighted
A highlighted variant for emphasised content sections.
Collapsible surface
Collapsible heading
This content can be toggled open and closed. Uses native HTML disclosure for full keyboard and screen reader support.
Collapsible highlighted surface
Collapsible highlighted heading
Highlighted variant of the collapsible surface for emphasised sections.
Small surface
Small collapsible heading
Smaller surface variant with compact padding for nested contexts.
Small highlighted surface
Small highlighted collapsible heading
Combines the highlighted color variant with compact sizing.
Code block
def greet(name)
"Hello, #{name}!"
end
CSS classes
| Class | Description |
|---|---|
l-ui-surface |
Default surface with background |
l-ui-surface--highlighted |
Highlighted state |
l-ui-surface--collapsible |
Collapsible surface with disclosure toggle (use on <details>) |
l-ui-surface--collapsible-highlighted |
Visual color variant of collapsible surface (uses bg-surface-highlighted), not an open-state modifier |
l-ui-surface__summary |
Summary/heading row inside a collapsible surface |
l-ui-surface--sm |
Compact variant with smaller padding and summary text |
l-ui-surface__chevron |
Disclosure chevron icon that rotates when open |
l-ui-surface__content |
Content area inside a collapsible surface |
pre.l-ui-surface |
Preformatted code block |