The heading component.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
childrenJSX.Element

React element children.

contentstring

The text content.

customAttributesobject

Custom attributes for the component.

customClassesstring | Array | object

Custom classes for the component.

sizestring

The font size for the heading.

spacingstring | number | Array | object

The spacing for the component, as a string, number, array, or object.

tagNamestring

The tag used for the heading, from h1 to h6.

typestring

The type of the heading, one of regular or boxed.

weightstring

The font weight for the heading.

refobject | null

Ref to the component.

Since
  • 1.1.15
Returns:

The heading component.

Type: 
JSX.Element
Example
import Heading from '@gravityforms/components/react/admin/elements/Heading';

return <Heading tagName="h2">{ 'Heading text' }</Heading>;