Skip to content

Properties

PropertyTypeDescription
textReact.Node(optional) A heading, can be text or React.Node.
childrenReact.Node(optional) A heading, can be text or React.Node.
sizexx-large
x-large
large
medium
basis
small
x-small
(optional) Define the typography font-size by a size type, e.g. x-large. Defaults to the predefined heading sizes.
level1
2
3
4
5
6
(optional) Overwrite the automated level handling to use a specific value to ensure correct level hierarchy.
increaseboolean(optional) If set to true, the heading level will be incremented by 1.
decreaseboolean(optional) If set to true, the heading level will be decremented by 1.
inheritboolean(optional) If set to true, the heading last used level will be inherited. Also from inside a level context.
resetboolean
number
(optional) If set to true, the heading level will be reset to 2. You can give it a custom level if you need to, e.g. reset(1).
skip_correctionboolean(optional) If set to true, the heading will not be corrected and warnings will not be shown. Warnings do not show up in production builds else either
debugboolean
function
(optional) If set to true, the content will have a prefix, showing the heading level.
debug_counterboolean
function
(optional) If set to true, the content will have both a prefix and a JSON log attached to both headings and level contexts.
elementstring
React.Element
(optional) define what HTML element should be used. If you use, e.g. a span, then role="heading" and aria-level gets set. Defaults to semantic heading element.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Properties which do apply to the provider (level context) Heading.Level as well:

  • increase
  • decrease
  • inherit
  • reset
  • skip_correction
  • debug