Maturity
Overview
The Heading Primitive is the underlying scaffolding for the Heading component. It lacks any defined style as it is intended to have style added and gives all abilities you’d expect from the text.
In most cases, Heading should fulfill the need to set a visual hierarchy for sections. But if there is a need for a localized version, Heading Primitive is a great base to work from. Try to use Heading whenever possible. If, for some reason it doesn’t fit your needs, let us know #design-system.
Related content
Properties
Name |
Values |
Default |
---|---|---|
align |
end, start, center, justify |
– |
color |
string |
– |
dir |
auto, ltr, rtl |
– |
hidden |
boolean |
– |
id |
string |
– |
inline |
boolean |
– |
level |
1, 2, 3, 4, 5, 6 |
2 |
size |
string |
– |
transform |
uppercase, lowercase, capitalize |
– |
truncate |
boolean |
– |
whiteSpace |
pre, normal, nowrap, pre-wrap, break-spaces, pre-line |
normal |
How to use
Because Heading is built with HeadingPrimitive, it has all the features and functionality with the added ability to be styled.
const NewHeading = styled(HeadingPrimitive)`
font-size: 100px;
color: blue;
`;
<NewHeading level={1}>My New Heading</NewHeading>