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 "@catalog-developer/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.
Catalog
Foundations
  • Overview
  • Components
  • Tokens
  • Token usage
  • Typography
  • Icons
Atoms
  • Avatar
  • Badge
  • Button
  • Checkbox
  • Color picker
  • Copy button
  • Icon tooltip
  • Inline code
  • Input
  • Hint
  • Kbd
  • Loader
  • Native select
  • Progress bar
  • Progress ring
  • Radio
  • Select
  • Status dot
  • Switch
  • Text link
  • Textarea
  • Tooltip
  • Truncate
Molecules
  • Accordion
  • Activity chart
  • AI elements
  • Alert
  • Button group
  • Card
  • Code block
  • Combobox trigger
  • Command
  • Content table
  • Context switcher
  • Dropdown menu
  • Empty state
  • Field
  • Field group
  • Filter chip
  • Flow
  • Heading
  • Icon picker
  • Icon flow card
  • Metric card
  • Modal
  • Modal confirmation
  • Pagination
  • Popover
  • Scroll area
  • Sidebar
  • Table
  • Tabs
  • Toggle group
LibraryPublished release