NoRedInk/noredink-ui/29.3.0

NOTE: the latest version is 35.9.3

Nri.Ui.Svg.V1

type Svg

Opaque type describing a non-interactable Html element.

withColor : Color -> Svg -> Svg
withLabel : String -> Svg -> Svg

Add a title to the svg. Note that when the label is not present, the icon will be entirely hidden from screenreader users.

Read Carie Fisher's "Accessible Svgs" article to learn more about accessible svgs.

Go through the WCAG images tutorial to learn more about identifying when images are functional or decorative or something else.

withWidth : Px -> Svg -> Svg
withHeight : Px -> Svg -> Svg
withCss : List Style -> Svg -> Svg

Css for the SVG's container.

withCustom : List (Attribute Never) -> Svg -> Svg
withViewBox : String -> Svg -> Svg
init : String -> List (Svg Never) -> Svg

Pass through the viewbox as the first argument and the contents of the svg node as the second argument.

toHtml : Svg -> Svg msg

render an svg.

Modules