Typically used as headers. Follow semantic hierarchy — Title 1s should be followed by Title 2s followed by Title 3s and so on, without skipping any levels.
Tags can be changed using the tag prop. However, be sure follow markdown semantics (h1's are followed by h2's followed by h3's and so on).
import React from 'react' import { Title } from '../../' const TitleLight = (props) => { return ( <div> <Title text="Default Title" {...props} /> <br /> <Title size={4} tag="h4" text="Title 4" {...props} /> <Title size={3} tag="h3" text="Title 3" {...props} /> <Title size={2} tag="h2" text="Title 2" {...props} /> <Title size={1} tag="h1" text="Title 1" {...props} /> </div> ) } export default TitleLight
Wrap anchor tags around the kit to make it clickable.
Link variant can only be applied to size 4
.
import React from 'react' import { Title } from '../../' const TitleVariants = (props) => { return ( <div> <Title size={4} tag="h4" text="Title 4 (link)" variant="link" {...props} /> </div> ) } export default TitleVariants