Badges in cardargus are inspired by shields.io and consist of a label-value pair with customizable colors.
The right side of the badge uses the specified color. The left side is always gray (#555):
# Green for success
badge_success <- create_badge("Build", "Passing", "#4CAF50")
# Red for failure
badge_error <- create_badge("Build", "Failing", "#e74c3c")
# Blue for information
badge_info <- create_badge("Version", "1.0.0", "#3498db")
# Orange for warning
badge_warning <- create_badge("Coverage", "45%", "#fab255")
# White (default)
badge_default <- create_badge("License", "MIT", "white")The badge automatically adjusts text color based on background brightness:
Create multiple badges in a horizontal row:
Badges are automatically positioned at the top of cards:
When using create_badge_row() or in cards, all badges
automatically have the same height for visual consistency: