Getting Started

Starting a new project

Stencil requires a recent LTS version of NodeJS and npm. Make sure you've installed and/or updated Node before continuing.

Reusable Components

Stencil can be used to create standalone components, or entire apps.

To build standalone components, such as a reusable UI element or library, you can use the component starter:

Note that you will need to use npm 6 or higher.

npm init stencil component my-components

Then, to start a live-reload server complete with HMR for development, run:

npm start

Building an app

Stencil is also a great option for building entire apps! To build an app with Stencil, we recommend using our App Starter:

npm init stencil app my-app

Then, to start a live-reload server complete with HMR for development, run:

npm start

This will give you a project with everything needed to build a fast, modern web app using Web Components. This project comes with the stencil-router pre-installed.

Updating Stencil

To get the latest version of @stencil/core you can run npm install @stencil/core@latest --save-exact.

Uh oh! We can't find the page your looking for.

Head back to the home page