Skip to content

Latest commit

 

History

History
70 lines (57 loc) · 1.29 KB

File metadata and controls

70 lines (57 loc) · 1.29 KB

Badge

Overview

  • TBadge is a compact, themable label component for highlighting status, categories, or small pieces of metadata. Use it where you need visual tags such as primary/secondary labels, outlined chips, destructive warnings, or general badges.

Features

  • Multiple predefined styles: primary, secondary, outline, destructive, and general.
  • Small, intrinsic sizing with configurable corner radius.
  • Theme-aware colors via TThemeManager and TFont helpers.
  • Simple named constructors for common variants.
  • Supports color overrides for background, text, and border.

📦 Import

import 'package:flutter_bamboo_ui_kit/core.dart';

Usage Example

// Simple primary badge inside a container
TBadge.primary(
  label: "Badge",
);

UI Preview

Badge Preview

Variant

Secondary badge

TBadge.secondary(
  label: "Badge",
);

Outline badge

TBadge.outline(
  label: "Badge",
);

Destructive badge

TBadge.destructive(
  label: "Badge",
);

General badge

TBadge.general(
  label: "Badge",
);

Custom colors and radius

TBadge(
  label: "Custom",
  backgroundColor: Colors.purple.shade50,
  textColor: Colors.purple,
  borderColor: Colors.purple.shade200,
  radius: 12,
);