Web components tutorial

Last updated Jun 30, 2026

Learn more about building a Vanilla JavaScript and HTML application using Web Components from Carbon. This tutorial shows you how to use Carbon components effectively while introducing web development best practices along the way.

Web components tutorial

Audience

This tutorial is intended for people with all amounts of web development experience. If you want to jump straight to code, you may want to skip this tutorial and go to the developers getting started page.

Here’s a preview of what you will build.

Prerequisites

HTML

This is a web development tutorial that uses HTML. If you’re not sure that you are quite ready then hop over to W3Schools

SCSS (CSS preprocessor)

This tutorial uses SASS, or rather the CSS styled flavour called SCSS. If you need help with CSS then head to W3Schools. For help with SCSS head to sass-lang.com.

ECMAScript (Javascript)

Javascript is fundamental to adding interaction to your HTML. There are many great resources out there, such as W3Schools, which is more than enough for everything in this tutorial.

GitHub

We’ll be using GitHub to build an app together, so if you’re new to GitHub, make sure you’ve made an account. Their getting started guide is a great way to learn GitHub.

Pnpm

This tutorial uses Pnpm for dependency management as that was the default for create-vite. Make sure that you have Pnpm installed prior to starting the tutorial so you can follow along step-by-step.

Outline

Each step in this tutorial illustrates a different aspect of developing web applications with Carbon. We recommend starting with step 1, but you can pick up any step and take it from there.

  1. Installing Carbon
    • Create a web app with the UI shell component.
  2. Building pages
    • Build pages with the grid and various components.
  3. Using APIs
    • Populate the data table with an external data source.
  4. Creating components
    • Extend Carbon by creating your own components.
  5. Deploying
    • Build and host your app in a production environment.