Crate badgeland[][src]

Fast badge generator for any purpose

Create badges with text, icons and sparkline chart

Web

See https://github.com/msuntharesan/badgeland#web

Quick start

Add badgeland to your Cargo.toml as as a dependency.

Examples

use badgeland::{Badge};

fn badge() {
  let mut badge = Badge::new();
  badge.subject("Subject");
  println!("{}", badge.text("Text").to_string());
}

This produce a svg badge:

 use badgeland::{Badge};

 fn badge_with_data() {
   let mut badge = Badge::new();
   badge.subject("Subject");
   println!("{}", badge.data(&[12., 34., 23., 56., 45.]).to_string());
 }

This produce a svg badge:

Structs

Badge
BadgeData
Color
Icon

Enums

Size
Style

Constants

DEFAULT_BLACK
DEFAULT_BLUE
DEFAULT_GRAY
DEFAULT_GRAY_DARK
DEFAULT_WHITE

Functions

icon_exists
icon_keys