sp-dev-fx-webparts/samples/js-propertycontrols-svg
Hugo Bernier 360169500d added remaining containers 2022-02-16 21:47:07 -05:00
..
.devcontainer Added all 1.12.1 and 1.13 containers 2022-02-14 02:52:18 -05:00
assets added remaining containers 2022-02-16 21:47:07 -05:00
config Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
release Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
src/webparts/svgHero Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
typings Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.editorconfig Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.gitignore Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.yo-rc.json Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
README.md Added all 1.12.1 and 1.13 containers 2022-02-14 02:52:18 -05:00
gulpfile.js Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
package-lock.json Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
package.json Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
tsconfig.json Updated packages to 1.13.0 2021-12-29 14:54:34 -05:00
tslint.json Updated packages to 1.13.0 2021-12-29 14:54:34 -05:00

README.md

Dynamic Scalable Vector Graphics (SVG) image using propertie

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.

picture of the web part in action

Compatibility

SPFx 1.13.0 Node.js v6 Compatible with SharePoint Online Compatible with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Local Workbench Incompatible Hosted Workbench Compatible Compatible with Remote Containers

Which PnP SPFx controls are being used in this sample?

Applies to

Solution

Solution Author(s)
js-propertycontrols-svg Chris Kent (thechriskent.com, @thechriskent)

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

Screenshot

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.