React implementation of the NL Design System Data Badge component
npm install @nl-design-system-candidate/data-badge-reactDisplayes a label with additional information, such as a category or a property.
Using npm
``shell`
npm install @nl-design-system-candidate/data-badge-react
Using pnpm
`shell`
pnpm add @nl-design-system-candidate/data-badge-react
Using yarn
`shell`
yarn add @nl-design-system-candidate/data-badge-react
If you want the React component with styles
`jsx`
import { DataBadge } from '@nl-design-system-candidate/data-badge-react/css';
If you just want the React component and import the styles separately
`jsx`
import { DataBadge } from '@nl-design-system-candidate/data-badge-react';
Uses a element with a value attribute to specify a machine-readable translation of the badge. For example this Data Badge associates the content with a product number in a database.
`jsx`
Uses a
`jsx``
All NL Design System components are white label. Use Data Badge design tokens to ensure it matches your brand styles. See nldesignsystem.nl/data-badge/#design-tokens for a full overview.
These tokens are also documented in @nl-design-system-candidate/data-badge-tokens.
Want to use the Data Badge with other frameworks or vanilla JavaScript? The React component is based on
@nl-design-system-candidate/data-badge-css.
Read more about the Data Badge and the accessibility guidelines in Dutch and find links to other resources like Figma and Storybook on nldesignsystem.nl/data-badge.