createIcon

@Composable
fun createIcon(viewBox: ViewBox? = ViewBox.sized(24), width: CSSLengthValue? = 1.em, renderStyle: IconRenderStyle? = IconRenderStyle.Stroke(), attrs: SVGSvgAttrsScope.() -> Unit? = null, content: ContentBuilder<SVGElement>)(source)

A convenience helper function for creating your own SVG icon.

This method takes a few common parameters (with defaults). Any of them can be set to null in case you want to handle them yourself, setting values on attrs directly.

Parameters

viewBox

The viewBox to use for the SVG. Defaults to 24x24.

width

The width of the SVG. Defaults to 1em (so that it will resize according to its container's font size). Can be set explicitly to null if you want to handle passing in sizes yourself.

renderStyle

The drawing style to use when rendering the SVG (i.e. stroke or fill).

attrs

A scope for setting attributes on the SVG.

content

A scope which handles declaring the SVG's content.