← All proposals

Badge

An extension of the PDS Badge: one new prop, as ('span' | 'kbd', default 'span').

Extends a PDS componentOpen in Storybook

proposals/Badge/custom.md24 lines · View on GitHub

Custom and net-new: Badge

Everything in this proposal that is not plain PDS v2.

Net-new components

None. This is the v2 .pds-badge.

Additions to existing PDS components

  • On .pds-badge: a kbd.pds-badge rule that sets font-family: inherit, so a badge rendered as a kbd keeps the page font instead of the browser's monospace.

Net-new props

  • as: 'span' | 'kbd', default 'span'. The element the badge renders as.

Custom CSS variables

None.

Raw values kept on purpose

None.