TagHeader
=========

*   GitHub: [BonnierNews/dn-design-system/web/src/components/tag-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/tag-header)
*   Storybook: [TagHeader](https://designsystem.dn.se/?path=/docs/section-tagheader--docs)

The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/tag-header/tag-header.scss'`

| Name | Description | Default |
|:--- | :--- | :--- |
| title\* | *   H1 Title<br />string | \- |
| vignetteText | Heading of the link box<br />string | \- |
| vignetteTargetUrl | Target URL for the vignette<br />string | \- |
| media | Main image<br />ComponentChild | \- |
| descriptionHtml | Intended use is text, links<br />string | \- |
| articleCount | Total articles on this list-page<br />number | \- |
| theme | The theme-class to apply to the vignette<br />"kultur", "nyheter" | \- |
| toggle | Show/hide toggle button<br />boolean | false |
| toggleText | `text` parameter to ToggleButton (only if `toggle` is enabled)<br />string | \- |
| toggleSelectedText | `selectedText` parameter to ToggleButton (only if `toggle` is enabled)<br />string | \- |
| toggleSelected | `selected` parameter to ToggleButton (only if `toggle` is enabled)<br />boolean | false |
| toggleLoading | `loading` parameter to ToggleButton (only if `toggle` is enabled)<br />boolean | false |
| toggleClassNames | `classNames` parameter to ToggleButton (only if `toggle` is enabled)<br />string | \- |
| toggleAttributes | `attributes` parameter to ToggleButton (only if `toggle` is enabled)<br />Record<string, unknown> | \- |
| classNames | Ex. "my-special-class"<br />string | \- |
| attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |

```jsx
<TagHeader
  articleCount={123}
  descriptionHtml="<p>Här samlas alla DN:s skivrecensioner – från Claude Debussy till Cannibal Corpse.</p>"
  media={<TeaserImage byline="Foto: Alexander Mahmoud" image={<ExamplePicture alt="Strumpor på torklina" className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/015275ed-234c-4762-b5aa-d61bf5ac6c94.jpeg?interpolation=lanczos-none&downsize=480:*&output-quality=80" srcSet="https://cached-images.bonnier.news/gcs/bilder/dn-mly/015275ed-234c-4762-b5aa-d61bf5ac6c94.jpeg?interpolation=lanczos-none&downsize=750:*&output-quality=60 750w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/015275ed-234c-4762-b5aa-d61bf5ac6c94.jpeg?interpolation=lanczos-none&downsize=960:*&output-quality=60 960w" style={{aspectRatio: '16 / 9'}}/>}/>}
  title="Skivrecensioner"
  toggle
  toggleSelectedText="Följer"
  toggleText="Följ"
/>
```