Heading With Anchor

A heading component that adds clickable anchor links for section sharing.

@spectrumui/heading-with-anchor

Heading 1

Heading 1 align

Installation

Login to view commandCreate a free account to access the install command

Usage

h1 to h6

Heading 1

Heading 1 without anchor

Heading 2

Heading 2 without anchor

Heading 3

Heading 3 without anchor

Heading 4

Heading 4 without anchor

Heading 5
Heading 5 without anchor
Heading 6
Heading 6 without anchor

Show anchor when hover heading

Show anchor when hover heading

Close to heading

Heading with anchor align

Properties

PropTypeDefaultDescription
classNamestring-

Customize the style by adding tailwind.

anchorstring-

anchor

anchorAlignment'close' | 'spaced'spaced

Alignment of anchor

anchorVisibility'hover' | 'always' | 'never'always

Visibility of anchor.

disableCopyToClipboardbooleanfalse

When clicking the anchor, it will copy the anchor link to clipboard.

If you want to disable, set it to true.