An SPFx web part that displays a Scalable Vector Graphics (SVG) image using properties to customize how it is rendered. The web part utilizes the PnP SPFx Property Controls package (specifially the SpinButton and ColorPicker) to set these properties.
Solution | Author(s) |
---|---|
js-propertycontrols-svgGhost | Nader Hadjebi (naderhadjebi.com, @nader2015) |
Version | Date | Comments |
---|---|---|
1.0 | September 28, 2022 | Initial release |
- Clone this repository
- in the command line run:
npm install
gulp serve
- Customize your PnP Hero!
This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.
Displays a Scalable Vector Graphics (SVG) image of the SharePoint Patterns and Practices Super Hero and allows users to customize the colors used and the size of the image through the use of PnP SPFx Property Controls (SpinButton & ColorPicker).
This Web Part illustrates the following concepts on top of the SharePoint Framework:
- Rendering an SVG image
- Using a PropertyFieldSpinButton control
- Using a PropertyFieldColorPicker control
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.