diff --git a/README.md b/README.md index b2c4c68..4b4fe54 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,24 @@ sp.stop `chars`: you can choose charset from [CHARSET](src/spinner/charset.cr) `default = CHARSET[:pipe]` +## Examples + +```crystal +require "spinner" +require "colorize" + +chars = CHARSET[:arrow].map do |c| + c.colorize(:light_green) +end + +spin = Spin.new(0.2, chars) +spin.start +sleep 3 +spin.stop +``` + +![Color](/images/color.gif) + ## Contributing 1. Fork it ( https://github.com/askn/spinner/fork ) diff --git a/images/color.gif b/images/color.gif new file mode 100644 index 0000000..6b6e439 Binary files /dev/null and b/images/color.gif differ