Heading
Page and section title
import { Heading } from '@ensdomains/thorin'
<Heading>Hello World</Heading>
name | type | default | description |
---|---|---|---|
ref | null | string | (instance: HTMLDivElement | null) => void | RefObject<HTMLDivElement> | - | Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null`
(or call the ref with `null` if you passed a callback ref).
@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
By default, the semantic heading level matches the visual heading level, e.g. <Heading level="2">
will render an h2
element. If you need the semantics to be different from the visuals, you can provide the desired HTML tag via the as
prop.
Use the responsive flag to resize the heading based on breakpoints.