badge

Badge

A short label such as new or sale, in the status colours and the commerce roles promo, discount, new and price, at three sizes.

Parts

PartFileDoes
BadgeBadge.vueMarks an item with a short label such as new or sale.

Styling

All of Badge’s styles live in badge.json. New to styling in Frontic UI? How styling works →

Install

npm packages
class-variance-authority
reka-ui

API reference

Badge.vue

Marks an item with a short label such as new or sale. Renders a <span>.

Props 5

PropTypeDefault
asChildbooleanfalse
asAsTag | Component'span'
variant'neutral' | 'info' | 'success' | 'warning' | 'error' | 'primary' | 'promo' | 'discount' | 'new' | 'price''neutral'
size'md' | 'sm' | 'lg''md'
classClassValue—

Data attributes 1

Data attributeValues
data-variant'neutral' | 'info' | 'success' | 'warning' | 'error' | 'primary' | 'promo' | 'discount' | 'new' | 'price'

Recipe badge 17 groups

Badge
State