8e6bd1404b | ||
---|---|---|
.. | ||
.devcontainer | ||
assets | ||
config | ||
release | ||
src/webparts/svgHero | ||
typings | ||
.editorconfig | ||
.gitignore | ||
.yo-rc.json | ||
README.md | ||
gulpfile.js | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
tslint.json |
README.md
Dynamic Scalable Vector Graphics (SVG) image using properties
Summary
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.
Compatibility
⚠️ Important |
---|
Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node. |
Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility. |
This sample is designed to be used in the following environments:
For more information about SPFx compatibility, please refer to https://aka.ms/spfx-matrix
Which PnP SPFx controls are being used in this sample?
Applies to
Contributors
Version history
Version | Date | Comments |
---|---|---|
1.1 | December 30, 2021 | Update to SPFx 1.13.0 |
1.0 | November 12, 2017 | Initial release |
Minimal Path to Awesome
- 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.
Features
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
Disclaimer
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.