Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Creating and Publishing Web Components with Stencil

Blog post from Twilio

Post Details
Company
Date Published
Author
Dominik Kundel
Word Count
2,256
Language
English
Hacker News Points
-
Summary

This blog post introduces the concept of Web Components and how they can be used with Stencil, a tool from Ionic. The author creates a simple progress bar component using Stencil's TypeScript, JSX, and decorators, which are then published to npm for consumption on other websites. The article covers the setup process, including configuring Stencil's build system, creating a new project, writing the component's code, publishing it to npm, and testing its functionality. It also touches on styling the web component using CSS Custom Properties and adding properties to the component via JavaScript. The author concludes by highlighting other tools and frameworks for building web components and encourages readers to share their own projects or ask questions.