Skip to content

Badges

Badges are either subtle or bold and use color to indicate meanings that users can learn and recognize across products.

Code

Brand Pill
packages/certara-ui/src/components/badge/badge.tsx
<certara-badge variant="brand">Brand</certara-badge>
<certara-badge type="pill">Pill</certara-badge>

certara-badge

Properties

PropertyAttributeDescriptionTypeDefault
typetype"badge" | "circle" | "pill"'badge'
variantvariant"brand" | "critical" | "cyan" | "danger" | "info" | "magenta" | "neutral" | "olive" | "orange" | "periwinkle" | "success" | "warning"'brand'

Dependencies

Used by

Graph

graph TD;
certara-tab-item --> certara-badge
style certara-badge fill:#f9f,stroke:#333,stroke-width:4px

Animation effect

Missing for FDA
<certara-badge variant="danger" class="is-pulsing-border-5x-danger">
Missing for FDA
</certara-badge>

In Practice

Selecting the badge’s shape and color

  • Use pills to display only counts.
  • Use critical badges sparingly and reserve them to display only counts like unread notification or unresolved issues.

Accessibility

  • Text must be clear enough for color blind users to be able to understand immediately without needing to rely only on the color.
  • Avoid using badges for longer text. Badges are not focusable, so the text truncated after 200 (or the custom maxWidth value) pixels will not be accessible.

Figma

View component in Figma