SOLVED

Extend built-in SP web part possible

Copper Contributor

Hello,

I'm a total noob in SPfx development, barely done with basic training - HelloWorldWebPart.

 

I'm wondering if it's possible to extend the web parts that are built into Sharepoint. And if so, how you would go about it.

 

I'm looking to slightly modify the News web part and was hoping to be able to do something like

import {NewsWebPart} from '@microsoft/sp-news-webpart;
and
export default class MyNewsWebPart extends NewsClientSideWebPart<INewsWebPartProps> {
 
and then just override the methods I need. Rather than re-inventing the wheel.
 
But I'm starting to think it's not possible
 
Any 2 Cents welcome!
2 Replies
best response confirmed by parrtaker65 (Copper Contributor)
Solution

@parrtaker65 

Sorry, this is not possible as you outlined and there is no expectation at this time to make out of the box webparts open source or release that code.

 

My recommendation is to check out the huge samples repository available in the PnP Community. There are webpart samples there that might have the functionality you want to add to the out of the box webpart, or might be code there that you could use to jumpstart building your custom webpart. If your final product could be useful for others to see, considering contributing back to the repository. (The instructions on doing that are on the website below.)

 

Links to the smples repo can be found at the link below, alongs with a LOT more information on multiple development technologies around Microsoft 365.  Good luck!

 

https://aka.ms/m365pnp 

 

Don Kirkham

Microsoft MVP, Office Development

 

Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Wow, guess I shouldn't be typing before my morning coffee. So many typos!!!
1 best response

Accepted Solutions
best response confirmed by parrtaker65 (Copper Contributor)
Solution

@parrtaker65 

Sorry, this is not possible as you outlined and there is no expectation at this time to make out of the box webparts open source or release that code.

 

My recommendation is to check out the huge samples repository available in the PnP Community. There are webpart samples there that might have the functionality you want to add to the out of the box webpart, or might be code there that you could use to jumpstart building your custom webpart. If your final product could be useful for others to see, considering contributing back to the repository. (The instructions on doing that are on the website below.)

 

Links to the smples repo can be found at the link below, alongs with a LOT more information on multiple development technologies around Microsoft 365.  Good luck!

 

https://aka.ms/m365pnp 

 

Don Kirkham

Microsoft MVP, Office Development

 

Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post