Heading
A flexible heading component that supports various heading levels and custom margins.
This component renders a heading (<h1>
, <h2>
, etc.) with customizable margin and style options. The heading level is determined by the As
prop, and additional attributes can be passed to the element.
Example Usage
Props
Determines which heading tag. Can be one of H1
, H2
, H3
, H4
, H5
, or H6
.
A shorthand for setting the margin for all sides of the heading element.
Sets the horizontal margin (margin-left
and margin-right
) of the heading element.
Sets the vertical margin (margin-top
and margin-bottom
) of the heading element.
Sets the margin-top
of the heading element.
Sets the margin-right
of the heading element.
Sets the margin-bottom
of the heading element.
Sets the margin-left
of the heading element.