Typography
Playground
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Content
DescriptionCode
From playground example
import { Content, Description, H1, H2, H3, H4, H5, H6 } from '@creation-ui/react'
export const TypographyExample = ({ ...props }) => {
return (
<div className={'flex flex-col'}>
<H1 {...props}>Heading 1</H1>
<H2 {...props}> Heading 2 </H2>
<H3 {...props}> Heading 3 </H3>
<H4 {...props}> Heading 4 </H4>
<H5 {...props}> Heading 5 </H5>
<H6 {...props}> Heading 6 </H6>
<hr />
<Content {...props}>Content</Content>
<Description {...props}>Description</Description>
</div>
)
}
Component API
The typography components have several props available for customization, outlined in the props table below. In addition, it accepts all native props that are applicable to the HTML typography element:
Prop | Default | Description |
size | md | sm | md | lg Size of the element |
children | — | React.ReactNode Children to be rendered inside the component |