JSPM

react-native-windows-svg

0.5.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q52440F
  • License MIT

react-native-windows-svg

Package Exports

  • react-native-windows-svg

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-windows-svg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-windows-svg

create windows svg component with Canvas、Shape.

Install

npm install --save react-native-windows-svg
# Add the `node_modules/react-native-windows-svg/windows/ReactNativeSVG` project to your `Solution`.

Usage

  1. Add the SVGReactPackage in your Solution.
        /// <summary>
        /// MainPage.cs
        /// </summary>
        ...
        public override List<IReactPackage> Packages
        {
            get
            {
                return new List<IReactPackage>
                {
                    new MainReactPackage(),
                    new SVGReactPackage() // add this line
                };
            }
        }
        ...
  1. Use the component in your react-native project.
    ...
    import {Svg, Rect } from 'react-native-windows-svg';
    ...
      <Svg width={300} height={300} >
        <Rect stroke="#000000" fill="#ffffff" rx={10} ry={10} strokeWidth={1} />
      </Svg>
    ...

Todos

  • SVG
  • Rect
  • Text
  • Circle
  • Line
  • Ellipse
  • G
  • Path
  • Polygon
  • Polyline

Contact