sp-dev-fx-webparts/samples/js-propertycontrols-svg/README.md

2.9 KiB

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.3.4 Node.js v6 Compatible with SharePoint Online Compatible with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Local Workbench Compatible Hosted Workbench Compatible

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.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!

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.