I was trying with using React.CreateElement in the description field and changing the type for the description field from string to IPropertyPaneField in the interface, but this declaration exists in index-internal.ts which is in node modules.

Please let me know how we can overwrite or change the type for the description field so it can take up the React.CreateElement function?

enter image description here


1 Answer 1


Check below web part sample in Github repository where author added hyperlink on web part property pane using custom HTML:

Script editor web part for modern pages built in React

Specially check these two files:

  1. PropertyPaneLogo.ts - custom HTML for hyperlink is written here

  2. ScriptEditorWebPart.ts - Imported custom HTML & overridden the property pane method in web part

You may also use the @pnp/spfx-property-controls in web part for customizing the property pane.

Check this control which might be helpful to you: PropertyPaneWebPartInformation control

Example output of this control:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.