Buttons

View code
New in v3.6! The buttons from Blaze 2 CSS!

Use


My **amazing** RG2 (_default_) Button!

Button Attributes

These can either be pased directly to the tag, or via the opts argument during mount. If provided to the tag, they override the opts arguments.

As with all RiotGear2 tags you can use markdown in your button text!

Note! It is recommended strongly that mount opts only be used when there is a single instance on a page.


style: <empty> | info | brand | warning | error | success

size: xsmall | small | medium | large | xlarge | super

ghost attribute: yes| no OR true | false | ghost

rounded: yes | no OR true | false | rounded regular

full width attribute: yes| no OR true | false

active attribute: yes| no OR true | false | active  non-active

disbled attribute: yes| no OR true | false | disabled  enabled


Button Styles


<no style>  _style_="**info**"  _style_="**warning**"  _style_="**success**"  _style_="**brand**"  _disabled_="**yes**" 

<no style>  _style_="**info**"  _style_="**warning**"  _style_="**success**"  _style_="**brand**"  _disabled_="**yes**" 

<no style>  _style_="**info**"  _style_="**warning**"  _style_="**success**"  _style_="**brand**"  _disabled_="**yes**" 

<no style>  _style_="**info**"  _style_="**warning**"  _style_="**success**"  _style_="**brand**"  _disabled_="**yes**" 


Button Sizes


_size_="**xsmall**"  _size_="**small**"  _size_="**medium**"  _size_="**large**"  _size_="**xlarge**"  _size_="**super**" 

Full Wdith Button


_size_="**xsmall**" <no style> _full_="**yes**"  _size_="**small**" _rounded_="**yes**" _style_="**info**" _full_="**yes**"  _size_="**medium**" _ghost_="**yes**" _style_="**warning**" _full_="**yes**"  _size_="**large**" _style_="**success**" _full_="**yes**"  _size_="**xlarge**" _ghost_="**yes**" _style_="**brand**" 

HTML

You can either pass the text content for the button within the rg-button tags, or via the text="" attribute. The text within the tag is always used, if present.

      <rg-button style="<empty>|brand|info|success|warning|error" [active=true] [disabled=false] [rounded=true] [ghost=true] [optional: text="Button Text"]>RG2 Rocks!</rg-button>
  

JavaScript


var tags = riot.mount("rg-button") ;