There are two basic ways to change or extend the functionality of existing web parts:
Important: We do not recommend customizing the code of the default web parts directly. Instead, create a clone of the required web part and implement the changes there. Using clones ensures that the system does not overwrite your code when applying hotfixes or upgrades to newer versions of Xperience.
Alternatively, you can create Inherited web parts – copies of existing web parts that share the code files, but allow you to modify the definitions of properties and their default values.