sp-dev-fx-webparts/samples/js-propertycontrols-svg
Hugo Bernier 71f50f1db1
Update README.md
2022-04-21 08:35:39 -04:00
..
.devcontainer Added all 1.12.1 and 1.13 containers 2022-02-14 02:52:18 -05:00
assets Updated sample.json 2022-04-11 03:09:56 +00:00
config Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
release Updated sample.json 2022-04-11 03:09:56 +00: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 Updated sample.json 2022-04-11 03:09:56 +00:00
.yo-rc.json Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
README.md Update README.md 2022-04-21 08:35:39 -04:00
gulpfile.js Updated mocha and chai and cleaned up code for deployment. 2021-12-30 11:03:34 -05:00
package-lock.json Bump url-parse from 1.5.4 to 1.5.10 in /samples/js-propertycontrols-svg 2022-04-11 20:43:02 +00:00
package.json Update package.json 2022-04-07 13:41:27 -04: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 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.

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.