Modifier classes change the style properties of UI elements, like color, size, and spacing, and may add responsive styling via CSS media queries. Bulma CSS includes modifier classes for many elements, or you can define your own using a custom stylesheet.
Add a list of modifier classes to a UI element
myElement
|> Ui.Modifier.addList
[ "is-size-3"
, "has-text-weight-bold"
, "has-text-centered"
]Conditionally add a modifier class if the boolean argument is True
myElement
|> Ui.Modifier.conditional
( "has-text-centered"
, myElement
|> Dom.Element.hasClass "box"
)
Add a single modifier class to a UI element