On this page

InstallationUsageAnchor actionsAPI reference

Heading

A semantic document heading using the DS typography role for its level, with an optional DS action beside the anchor.

Start here

Installation

import { Heading } from "@dome-systems/ds-dashboard/components";

Usage

Choose the level that represents the heading's place in the document. Heading supplies the correct DS type role; its parent owns surrounding layout spacing.

Start here

Configure access

1<Heading as="h2">Start here</Heading>2<Heading as="h3">Configure access</Heading>

Anchor actions

An id turns the heading text into its fragment link. Attach a DS CopyButton as action when the surface needs a companion action such as Docs' concise copy control. Heading reveals the action on hover, focus, and touch by default.

Start here

1<Heading2  as="h2"3  id="start-here"4  action={<CopyButton value={url} label="Copy" size="xs" />}5>6  Start here7</Heading>

API reference

PropTypeDefaultDescription
as"h1" | "h2" | "h3" | "h4" | "h5" | "h6""h2"Sets both the semantic element and its matching DS text-heading role.
idstring—Makes the heading text an anchor to its section.
actionReactNode—A sibling DS control, revealed on heading hover or keyboard focus. Docs supplies its ghost, tooltip-free CopyButton here.
childrenReactNode—The heading's accessible name and visible content.