💧 OMA Utilities WG • Water 2.0 has launched • Utility Membership •

🏙️ OMA Conformance Tool • Apply for Early Access •


Badge

Usage

ShBadge shows a short, highly visible text such as a version number, a document status or a category label. The text is written as the content of the component.

Basic

A badge with its default style.

1.2+

::ShBadge
1.2+
::

Custom style

A badge with the default classes of wrapper extended through ui. Classes passed in ui are merged with the defaults, so a conflicting class (for example another background color) replaces the default one.

1.2+

::ShBadge
---
ui:
  wrapper: hover:scale-125 duration-300 mx-10 bg-oma-red-50 dark:bg-oma-red-700 text-primary
---
1.2+
::

Props

PropTypeDefaultDescription
uiRecord<string, any>–Overrides the default classes of the UI config below. Values are merged with the defaults using tailwind-merge.
descriptionstring""Note for content writers. It is not rendered on the website.

Slots

  • default

UI config

Default classes of every styled element. Override any key through the ui prop, as in the custom style example above.

KeyDefault classesDescription
wrapperbg-neutral-100 border-neutral-300 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-300 text-neutral-700Container of the badge: background, border, text color and their dark-mode variants.