Create a widget
You can create a widget either by manually copying and editing the files or by using the
gbc tool command, create-widget
.
You have two options for creating a widget:
- Manual creation: This method involves first copying the original JavaScript, template, and SCSS files associated with the widget you want to customize. Once you have your copies, you can edit these files to define the widget's behavior, appearance, and functionality according to your specific requirements. This approach offers complete control over the widget's design and implementation, allowing for extensive customization. For details, go to Create a widget manually.
- Command-line creation: Use the
gbc
tool with thecreate-widget
command to create the necessary JavaScript, template, and SCSS files in the js and sass directories of your customization directory. This is the recommended approach as it streamlines the process and ensures consistency, making it quicker and easier to set up your widget. For details, go to Create a widget with command.
For the best experience, we encourage you to use the command-line option!