Bulma styles the native <button> and <a class="button"> elements with a shared button base class. Color and size come from modifiers: is-primary, is-light, is-small, is-fullwidth.
Semantics and states
- Use
<button type="button">for actions; use anchors only when navigation is the real behavior. - Disabled: add the
disabledattribute on buttons or theis-staticmodifier where appropriate. - Grouped actions: wrap siblings in
buttonsorbuttons has-addonsfor segmented toolbars.
Compared to Bootstrap buttons, Bulma uses is-* modifiers instead of btn-primary. Tailwind composes utilities; Bulma encodes hover, focus, and contrast in the element stylesheet.
Important interview questions and answers
- Q: button vs is-primary?
A:buttonis the element class;is-primarypicks the palette variant—modifiers stack on the base. - Q: When use is-light or is-outlined?
A:is-lightsoftens backgrounds on colored sections;is-outlinedkeeps transparent fills with a border—useful on busy heroes or images.
Self-check
- Which two classes create a small danger button?
- Why prefer a real
buttonover a styleddiv?