brazier/svg

Values

pub fn animate(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

An <animate> element.

pub fn animate_transform(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

An <animateTransform> element.

pub fn circle(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <circle> element.

pub fn clip_path(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <clipPath> element for clipping.

pub fn clip_rule(value: String) -> attribute.Attribute(msg)

The clip-rule attribute.

pub fn cx(value: String) -> attribute.Attribute(msg)

The cx attribute (center x coordinate).

pub fn cy(value: String) -> attribute.Attribute(msg)

The cy attribute (center y coordinate).

pub fn d(value: String) -> attribute.Attribute(msg)

The d attribute for path data.

pub fn defs(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A definitions element <defs> for reusable components.

pub fn desc(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <desc> element for accessible SVG descriptions.

pub fn ellipse(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

An <ellipse> element.

pub fn fill(value: String) -> attribute.Attribute(msg)

The fill attribute.

pub fn fill_opacity(value: String) -> attribute.Attribute(msg)

The fill-opacity attribute.

pub fn fill_rule(value: String) -> attribute.Attribute(msg)

The fill-rule attribute.

pub fn filter(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <filter> element.

pub fn foreign_object(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <foreignObject> element for embedding non-SVG content.

pub fn g(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A grouping element <g>.

pub fn height(value: String) -> attribute.Attribute(msg)

The height attribute.

pub fn image(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

An <image> element for embedding raster images.

pub fn line(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <line> element.

pub fn linear_gradient(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <linearGradient> element.

pub fn mask(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <mask> element.

pub fn opacity(value: String) -> attribute.Attribute(msg)

The opacity attribute.

pub fn path(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <path> element — the most versatile SVG shape.

pub fn points(value: String) -> attribute.Attribute(msg)

The points attribute for polyline/polygon.

pub fn polygon(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <polygon> element.

pub fn polyline(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <polyline> element.

pub fn r(value: String) -> attribute.Attribute(msg)

The r attribute (radius).

pub fn radial_gradient(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <radialGradient> element.

pub fn rect(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <rect> element.

pub fn rx(value: String) -> attribute.Attribute(msg)

The rx attribute (horizontal radius).

pub fn ry(value: String) -> attribute.Attribute(msg)

The ry attribute (vertical radius).

pub fn stop(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <stop> element for gradient color stops.

pub fn stroke(value: String) -> attribute.Attribute(msg)

The stroke attribute.

pub fn stroke_dasharray(
  value: String,
) -> attribute.Attribute(msg)

The stroke-dasharray attribute.

pub fn stroke_dashoffset(
  value: String,
) -> attribute.Attribute(msg)

The stroke-dashoffset attribute.

pub fn stroke_linecap(value: String) -> attribute.Attribute(msg)

The stroke-linecap attribute.

pub fn stroke_linejoin(value: String) -> attribute.Attribute(msg)

The stroke-linejoin attribute.

pub fn stroke_opacity(value: String) -> attribute.Attribute(msg)

The stroke-opacity attribute.

pub fn stroke_width(value: String) -> attribute.Attribute(msg)

The stroke-width attribute.

pub fn svg(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

The root <svg> element with the SVG namespace.

pub fn symbol(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <symbol> element for defining graphical template objects.

pub fn text(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <text> element for SVG text content.

pub fn title(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <title> element for accessible SVG titles.

pub fn transform(value: String) -> attribute.Attribute(msg)

The transform attribute.

pub fn tspan(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

A <tspan> element for text sub-positioning.

pub fn use_(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)

A <use> element for referencing other SVG elements. Named use_ because use is a reserved keyword in Gleam.

pub fn viewbox(value: String) -> attribute.Attribute(msg)

The viewBox attribute (e.g., “0 0 24 24”).

pub fn width(value: String) -> attribute.Attribute(msg)

The width attribute.

pub fn x(value: String) -> attribute.Attribute(msg)

The x attribute.

pub fn x1(value: String) -> attribute.Attribute(msg)

The x1 attribute.

pub fn x2(value: String) -> attribute.Attribute(msg)

The x2 attribute.

pub fn y(value: String) -> attribute.Attribute(msg)

The y attribute.

pub fn y1(value: String) -> attribute.Attribute(msg)

The y1 attribute.

pub fn y2(value: String) -> attribute.Attribute(msg)

The y2 attribute.

✨ Search Document