Skip to main content

Badge

About 1325 wordsAbout 4 min

Badge

installation

import { FgBadge } from 'fadgram-vue'

Props

PropTypeDefaultDescription
colorBadgeColor—Color variant. Options: primary, secondary, light, dark, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, slate, gray, zinc, neutral, stone.
iconstring—Icon name to display (requires icon component).
labelstring—Text label for the Badge.
classstring—Custom CSS classes to apply.
outlinebooleanfalseWhether to use outline style.
pillbooleanfalseWhether to use pill-shaped rounded corners.
gradientbooleanfalseWhether to apply gradient background.
size'xs' | 'sm' | 'default' | 'lg' | 'xl' | 'xxl'—Direct size specification (overrides individual size props).
xsbooleanfalseExtra small size (alternative to size prop).
smbooleanfalseSmall size (alternative to size prop).
lgbooleanfalseLarge size (alternative to size prop).
xlbooleanfalseExtra large size (alternative to size prop).
xxlbooleanfalseExtra extra large size (alternative to size prop).

Basic usage

Preview
Badge

Label & icon

shortness slots

Label

Preview
Badge

Icon

Preview

label and Icon

Preview
Profile

Color

Preview
primarysecondarylightdarkredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkroseslategrayzincneutralstone

Outline

Preview
primarysecondarylightdarkredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkroseslategrayzincneutralstone

Pill

Preview
primarysecondarylightdarkredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkroseslategrayzincneutralstone

Merge appearance

Outline pill

Preview
primarysecondarylightdarkredorangeamberyellowlimegreenemeraldtealcyanskyblueindigovioletpurplefuchsiapinkroseslategrayzincneutralstone

Size

Preview
xssmdefaultlgxlxxl