lustre/ui/layout/centre

Functions

pub fn centre(
  attributes: List(Attribute(a)),
  children: Element(a),
) -> Element(a)

A box is a generic container element with some padding applied to all sides. Many of the other layouting elements use margin to space themselves from other elements, but a box uses padding to space its children from itself.

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

By default, the box element uses a <div /> as the underlying container. You can use this function to create a box using a different element such as a <section /> or a <p />.

Search Document