Features

SVG

ClassName-styled react-native-svg primitives.

SVG

Install the optional peer:

yarn add react-native-svg

Then import wrapped SVG primitives:

import { Svg, Path } from '@nitrofoundation/nitrowind/svg';

<Svg viewBox="0 0 24 24" className="h-6 w-6">
  <Path d={ICON} className="fill-primary stroke-white/50 stroke-2" />
</Svg>;

SVG components hoist paint styles out of resolved className styles and onto react-native-svg props.

UtilityProp
fill-*fill
stroke-*stroke
stroke-2strokeWidth
opacity-50opacity
[fill-opacity:0.5]fillOpacity
[stroke-opacity:0.4]strokeOpacity

Use withSvgClassName to wrap additional SVG-like components with the same mapping.

On this page