[][src]Crate merit

Fast badge generator for any purpose

Create badges with text, icons and sparkline chart

Web

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

Quick start

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

Examples

use merit::{Badge};

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

This produce a svg badge:

 use merit::{Badge};

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

This produce a svg badge:

Structs

Badge
BadgeData
Color
Icon

Enums

Size
Styles

Constants

DEFAULT_BLUE
DEFAULT_GRAY
DEFAULT_GRAY_DARK
DEFAULT_WHITE

Functions

icon_exists
icon_keys