Rect

@Composable
fun ElementScope<SVGElement>.Rect(attrs: SVGRectAttrsScope.() -> Unit)(source)

Type-safe API for creating an SVGRectElement.

For example, to create a Rect and Rounded Corner Rect of size 100x100 :

// Simple Rectangle
Svg {
Rect {
width(100)
height(100)
}
}

// Rounded corner rectangle
Svg {
Rect {
x(4)
y(4)
width(100)
height(100)
rx(15)
ry(15)
}
}

See also