lustre/ui/tag

Functions

pub fn error() -> Attribute(a)
pub fn greyscale() -> Attribute(a)
pub fn info() -> Attribute(a)
pub fn of(
  element: fn(List(Attribute(a)), List(Element(a))) -> Element(a),
  attributes: List(Attribute(a)),
  children: List(Element(a)),
) -> Element(a)

Use this function if you want to render something other than a <span /> element.

pub fn outline() -> Attribute(a)
pub fn primary() -> Attribute(a)
pub fn soft() -> Attribute(a)
pub fn solid() -> Attribute(a)
pub fn success() -> Attribute(a)
pub fn tag(
  attributes: List(Attribute(a)),
  children: List(Element(a)),
) -> Element(a)

A simple tag. This shares styles with lustre_ui’s buttons, but are much smaller and uninteractive by default. They are useful for displaying small amounts of information, such as category tags or labels.

If you want a tag to be interactive, you should either use the of function below to construct a tag with html.button or you should set the tabindex attribute and handle both click and key events for Enter and Space.

pub fn warning() -> Attribute(a)
Search Document