@bento/heading
v0.1.4
Published
Heading component primitive
Readme
Heading
The @bento/heading package exports the Heading component primitive.
Installation
npm install --save @bento/headingProps
The @bento/heading package exports the Heading component:
The following properties are available to be used on the Heading component:
Examples
Level
Setting the level prop allows you to change the HTML tag of the Heading component.
Without a level prop, the Heading component will render as a span element.
This is because we cannot assume the appropriate heading level for the content without context.
Provider
The HeadingProvider component allows you to set the heading level for the Heading component by way of nesting.
Override
Even when using the HeadingProvider component, you can override the heading level by passing the level prop to the Heading component.
