2016-09-11 11:00:49 +00:00
---
layout: documentation
doc-tab: modifiers
doc-subtab: syntax
---
{% include subnav-modifiers.html %}
< section class = "section" >
< div class = "container" >
< h1 class = "title" > Modifiers syntax< / h1 >
< h2 class = "subtitle" > Most Bulma elements have < strong > alternative< / strong > styles. To apply them, you only need to append one of the < strong > modifier classes< / strong > .
< br >
They all start with < code > is-< / code > or < code > has-< / code > .< / h2 >
< hr >
< div class = "columns" >
< div class = "column" >
< p > Let's start with a simple < strong > button< / strong > that uses the < code > "button"< / code > CSS class:< / p >
< / div >
2016-12-23 12:13:50 +00:00
{% capture button_example %}
< a class = "button" >
Button
< / a >
{% endcapture %}
2016-09-11 11:00:49 +00:00
< div class = "column" >
< p >
2016-12-23 12:13:50 +00:00
{{button_example}}
2016-09-11 11:00:49 +00:00
< / p >
< / div >
< div class = "column is-half" >
{% highlight html %}
2016-12-23 12:13:50 +00:00
{{button_example}}
2016-09-11 11:00:49 +00:00
{% endhighlight %}
< / div >
< / div >
< div class = "columns" >
< div class = "column" >
< p > By < strong > adding< / strong > the < code > "is-primary"< / code > CSS class, you can modify the < strong > color< / strong > :< / p >
< / div >
2016-12-23 12:13:50 +00:00
{% capture button_primary_example %}
< a class = "button is-primary" >
Button
< / a >
{% endcapture %}
2016-09-11 11:00:49 +00:00
< div class = "column" >
< p >
2016-12-23 12:13:50 +00:00
{{button_primary_example}}
2016-09-11 11:00:49 +00:00
< / p >
< / div >
< div class = "column is-half" >
{% highlight html %}
2016-12-23 12:13:50 +00:00
{{button_primary_example}}
2016-09-11 11:00:49 +00:00
{% endhighlight %}
< / div >
< / div >
< div class = "columns" >
< div class = "column" >
< div class = "content" >
< p > You can use one of the < strong > 5 main colors< / strong > :< / p >
< ul >
< li > < code > is-primary< / code > < / li >
< li > < code > is-info< / code > < / li >
< li > < code > is-success< / code > < / li >
< li > < code > is-warning< / code > < / li >
< li > < code > is-danger< / code > < / li >
< / ul >
< / div >
< / div >
< div class = "column" >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-primary" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-info" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-success" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-warning" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-danger" > Button< / a >
< / p >
< / div >
< div class = "column is-half" >
{% highlight html %}
< a class = "button is-primary" >
Button
< / a >
< a class = "button is-info" >
Button
< / a >
< a class = "button is-success" >
Button
< / a >
< a class = "button is-warning" >
Button
< / a >
< a class = "button is-danger" >
Button
< / a >
{% endhighlight %}
< / div >
< / div >
< div class = "columns" >
< div class = "column" >
< div class = "content" >
< p > You can also alter the < strong > size< / strong > :< / p >
< ul >
< li > < code > is-small< / code > < / li >
< li > < code > is-medium< / code > < / li >
< li > < code > is-large< / code > < / li >
< / ul >
< / div >
< / div >
< div class = "column" >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-small" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-medium" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-large" > Button< / a >
< / p >
< / div >
< div class = "column is-half" >
{% highlight html %}
2016-12-23 12:13:50 +00:00
< a class = "button is-small" >
Button
< / a >
< a class = "button" >
Button
< / a >
< a class = "button is-medium" >
Button
< / a >
< a class = "button is-large" >
Button
< / a >
2016-09-11 11:00:49 +00:00
{% endhighlight %}
< / div >
< / div >
< div class = "columns" >
< div class = "column" >
< div class = "content" >
< p > Or the < strong > style< / strong > or < strong > state< / strong > :< / p >
< ul >
< li > < code > is-outlined< / code > < / li >
< li > < code > is-loading< / code > < / li >
< li > < code > is-disabled< / code > < / li >
< / ul >
< / div >
< / div >
< div class = "column" >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-primary is-outlined" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-primary is-loading" > Button< / a >
< / p >
2017-03-14 21:00:58 +00:00
< p class = "field" >
2016-09-11 11:00:49 +00:00
< a class = "button is-primary is-disabled" > Button< / a >
< / p >
< / div >
< div class = "column is-half" >
{% highlight html %}
< a class = "button is-primary is-outlined" >
Button
< / a >
< a class = "button is-primary is-loading" >
Button
< / a >
< a class = "button is-primary is-disabled" >
Button
< / a >
{% endhighlight %}
< / div >
< / div >
< / div >
< / section >