nl-design-system / backlog

Central product backlog of the NL Design System.
European Union Public License 1.2
9 stars 1 forks source link

Heading #114

Open Robbert opened 3 years ago

Robbert commented 3 years ago

Naam

Heading

Link naar GitHub Discussion


Notities

Technical component, will be represented as <h1>-<h6> in Figma.

Sometimes in a JavaScript framework application it might be useful to have a heading that will change it's level based on the input it receives from somewhere else. For example if a CMS provides data it might then also determine the heading levels.

This component will then render h1-h6 based on the level=x attribute the <Heading> component receives.

Use when

For example your component might look like <Heading level={data.title.level}>{data.title}</Heading>

Don't use when

For example your component might look like <Heading level=3>{data.title}</Heading> use <Heading3>{data.title}</Heading3> instead

Figma

The default HTML heading levels should be documented and available in Figma:

usethetics commented 2 years ago

Figma component containing headings level one to six, including a default measure (line-length): https://www.figma.com/file/gqQhMe3gj4YlC6JrZOWiCv/?node-id=2365%3A2035