Stencil’s architecture allows for organized customization using npm and React. In production, you can use these tools for stylizing seasonally themed products, temporary promotions, or event tickets. Below is a short tutorial on using npm and React to customize your Stencil theme.
In this example, we’ll be making a drawer that sends a coupon code to the customer’s email using Material UI’s React framework. The resulting customization will look like the following:

To set up a BigCommerce store, see Creating a Trial Store.
To build this customization, complete the instructions in the following sections.
For this example, we’ll be using packages from Material-UI. These components require certain modules.
Navigate into the root Cornerstone theme folder, then install the following npm packages.
Update webpack.common.js with the React preset.
In the following steps, we’ll be adding React components to assemble our coupon drawer.
./assets/js folder./components folder within the /js folder./components folder.CouponDrawer.js file./components folder, create a VerticalStepper.js file./components folder, create a TextField.js file.assets/js/app.js while also creating a theme instance for Material UI:CouponDrawer component and assign it an id.templates/layout/base.html.View the finished product using the Stencil CLI command stencil start in the Cornerstone theme directory.
Open your browser and navigate to localhost:3000 to view your local storefront.
Note: This coupon drawer example does not send coupon codes to the emails entered. This is only an example to show how to customize your storefront theme.