Docs Quickstart Figma Flowbite
1.3.0
Components Badge

Badge

Use Tailwind CSS badges as elements to show counts or labels separately or inside other components


Default badge

Show on Github
DefaultPrimaryBlueRedGreenYellowIndigoPurplePink
html
typescript
<flowbite-badge>Default</flowbite-badge>
<flowbite-badge color="primary">Primary</flowbite-badge>
<flowbite-badge color="blue">Blue</flowbite-badge>
<flowbite-badge color="red">Red</flowbite-badge>
<flowbite-badge color="green">Green</flowbite-badge>
<flowbite-badge color="yellow">Yellow</flowbite-badge>
<flowbite-badge color="indigo">Indigo</flowbite-badge>
<flowbite-badge color="purple">Purple</flowbite-badge>
<flowbite-badge color="pink">Pink</flowbite-badge>

Large badge

Show on Github
Default Primary Blue Red Green Yellow Indigo Purple Pink
html
typescript
<flowbite-badge size="sm">Default</flowbite-badge>
<flowbite-badge
  color="primary"
  size="sm">
  Primary
</flowbite-badge>
<flowbite-badge
  color="blue"
  size="sm">
  Blue
</flowbite-badge>
<flowbite-badge
  color="red"
  size="sm">
  Red
</flowbite-badge>
<flowbite-badge
  color="green"
  size="sm">
  Green
</flowbite-badge>
<flowbite-badge
  color="yellow"
  size="sm">
  Yellow
</flowbite-badge>
<flowbite-badge
  color="indigo"
  size="sm">
  Indigo
</flowbite-badge>
<flowbite-badge
  color="purple"
  size="sm">
  Purple
</flowbite-badge>
<flowbite-badge
  color="pink"
  size="sm">
  Pink
</flowbite-badge>

Bordered badge

Show on Github
Default Primary Blue Red Green Yellow Indigo Purple Pink
html
typescript
<flowbite-badge [hasBorder]="true">Default</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="primary">
  Primary
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="blue">
  Blue
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="red">
  Red
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="green">
  Green
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="yellow">
  Yellow
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="indigo">
  Indigo
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="purple">
  Purple
</flowbite-badge>
<flowbite-badge
  [hasBorder]="true"
  color="pink">
  Pink
</flowbite-badge>
Show on Github
Default Primary Blue Red Green Yellow Indigo Purple Pink
html
typescript
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link">
  Default
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="primary">
  Primary
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="blue">
  Blue
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="red">
  Red
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="green">
  Green
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="yellow">
  Yellow
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="indigo">
  Indigo
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="purple">
  Purple
</flowbite-badge>
<flowbite-badge
  flowbiteRouterLink
  routerLink="./"
  fragment="badge-as-link"
  color="pink">
  Pink
</flowbite-badge>

Badge with icon

Show on Github
2 minutes ago 3 days ago
html
typescript
<flowbite-badge>
  <flowbite-icon
    svgIcon="outline:check"
    class="h-3 w-3" />
  2 minutes ago
</flowbite-badge>
<flowbite-badge color="primary">
  <flowbite-icon
    svgIcon="outline:clock"
    class="h-3 w-3" />
  3 days ago
</flowbite-badge>

Badge with icon only

Show on Github
html
typescript
<flowbite-badge [isIconOnly]="true">
  <flowbite-icon
    svgIcon="outline:check"
    class="h-3 w-3" />
</flowbite-badge>
<flowbite-badge
  [isIconOnly]="true"
  color="primary">
  <flowbite-icon
    svgIcon="outline:check"
    class="h-3 w-3" />
</flowbite-badge>
<flowbite-badge
  [isIconOnly]="true"
  size="sm">
  <flowbite-icon
    svgIcon="outline:check"
    class="h-3.5 w-3.5" />
</flowbite-badge>
<flowbite-badge
  [isIconOnly]="true"
  color="primary"
  size="sm">
  <flowbite-icon
    svgIcon="outline:check"
    class="h-3.5 w-3.5" />
</flowbite-badge>

Dismissable badge

Show on Github
Default Primary Blue Red Green Yellow Indigo Purple Pink
html
typescript
typescript
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss">
  Default
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="primary">
  Primary
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="blue">
  Blue
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="red">
  Red
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="green">
  Green
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="yellow">
  Yellow
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="indigo">
  Indigo
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="purple">
  Purple
</flowbite-badge>
<flowbite-badge
  [isDismissable]="true"
  [onDismiss]="onDismiss"
  color="pink">
  Pink
</flowbite-badge>
Flowbite

© 2019-2024 Flowbite™ is a registered trademark. All Rights Reserved.