howdy/ui/aspect_ratio

Aspect ratios: a box that keeps its shape as it grows and shrinks, for images, video and maps.

aspect_ratio.aspect_ratio(16, 9, [], [html.img([attribute.src("/cover.jpg"), attribute.alt("")])])

An image or video inside fills the box, cropped to fit.

Values

pub fn aspect_ratio(
  width: Int,
  height: Int,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A box width by height in proportion.

pub fn classes() -> List(css.Class)

Every class this module uses, for howdy/ui/export.

pub fn ratio_class() -> css.Class
✨ Search Document