Academind-Pro-Kurs
Web Components & Stencil.js - Build Custom HTML Elements
A Complete Introduction to building Custom HTML Elements/ Web Components with and without StencilJS
- 10 Abschnitte · 147 Lektionen
- 8 Std., 45 Min. insgesamt
Über diesen Kurs
You’ve built plenty of UIs with the HTML tags the browser gives you—and you’ve also hit the moment where you wish <tabs>, a <side-drawer>, or a <modal> just existed. Copy-pasting markup and JavaScript between projects gets old fast, and frameworks aren’t always the answer.
In this course, you’ll use Web Components (native custom HTML elements) to create re-usable building blocks with just HTML, CSS, and JavaScript. You’ll start with what the browser already supports, then use Stencil.js to make more complex components easier to build with a modern workflow.
By the end, you’ll be able to ship your own lightweight custom elements, style them safely, pass data in and out, and wire them into real apps—whether you’re using Angular, React, Vue, or no framework at all.
Was du lernst
You’ll go from native browser Web Components to a Stencil.js workflow that helps you build and share custom elements across projects and frameworks.
- 01
Create custom elements
Build re-usable, lightweight custom HTML elements using native browser features, so you can package UI behavior into tags you can drop into any project.
- 02
Build complex UI components
Implement components of different complexity levels—from a simple tooltip up to UI patterns like modals and side drawers—without relying on Angular, React, or Vue.
- 03
Pass data into components
Feed data into your web components and use it internally, so your custom elements can be configured and re-used with different inputs across pages and apps.
- 04
Emit custom events
Create and dispatch your own events from inside a component, then listen to them in JavaScript to react to user interactions and component state changes.
- 05
Scope styles with Shadow DOM
Use the Shadow DOM to keep CSS styles encapsulated within your custom elements, preventing style leakage and avoiding conflicts with the rest of the page.
- 06
Work efficiently with Stencil.js
Use Stencil.js features to streamline development of native web components, including a workflow that leverages TypeScript and JSX (taught in the course).
Voraussetzungen
Basic JavaScript knowledge (base syntax, DOM basics, object basics).
ES6+ JavaScript (e.g.
const,let, classes) is recommended but not required; a brief refresher is included.No prior Angular/React/Vue, TypeScript, or JSX knowledge is required.
Für wen dieser Kurs ist
Curious web builders
You want to create your own custom HTML tags and stop re-creating the same UI patterns in every project. This course gives you a clear path to doing that with browser-native tech.
Framework-agnostic developers
You work across different stacks (or switch often) and need UI pieces you can re-use anywhere. Web Components let you share the same elements across Angular, React, Vue, or plain JavaScript apps.
Future-focused students
You’re looking for a future-proof web technology that’s built into the browser and fits into any web app. You want something practical you can apply immediately without needing deep framework expertise.
Lehrplan
Sieh dir Aufbau und Tempo dieses Kurses an, bevor du startest.
1Introduction9 Lektionen · 27 Min.
- 01Introduction1:38 Min.
- 02Web Components - A Quick Demo6:30 Min.
- 03What are Web Components3:22 Min.
- 04Join our Online Learning Community0:00 Min.
- 05Why Do We Use Web Components?3:05 Min.
- 06Comparing Web Components & Frameworks6:15 Min.
- 07Course Outline2:46 Min.
- 08How To Get The Most Out Of The Course3:04 Min.
- 09The Academind Pro Referral Program0:00 Min.
2Refreshing Next Generation JavaScript (Optional)11 Lektionen · 35 Min.
- 01Module Introduction1:12 Min.
- 02Understanding "let" and "const"3:05 Min.
- 03Working with Arrow Functions5:27 Min.
- 04Exports and Imports4:43 Min.
- 05Understanding Classes4:30 Min.
- 06Classes, Properties and Methods3:03 Min.
- 07The Spread & Rest Operator6:27 Min.
- 08Refreshing Array Functions2:32 Min.
- 09JS Array Functions2:32 Min.
- 10Understanding Async Code1:04 Min.
- 11Next-Gen JavaScript - Summary0:00 Min.
3Understanding the Basics22 Lektionen · 1 Std., 32 Min.
- 01Module Introduction - What are Web Components?5:07 Min.
- 02Browser Support3:05 Min.
- 03Our Development Setup4:38 Min.
- 04Creating our First Custom Element8:28 Min.
- 05Interacting with the Surrounding DOM5:04 Min.
- 06Understanding the Custom Elements Lifecycle2:51 Min.
- 07Using "connectedcallback" for DOM Access2:05 Min.
- 08Listening to Events Inside the Component8:52 Min.
- 09Using Attributes on Custom Elements4:45 Min.
- 10"Attributes" vs "Properties"0:00 Min.
- 11Styling our Elements4:08 Min.
- 12Using the Shadow DOM5:00 Min.
- 13Adding an HTML Template5:40 Min.
- 14Using Slots1:50 Min.
- 15Defining the Template in JavaScript3:29 Min.
- 16Using Style Tags in the Shadow DOM2:40 Min.
- 17Extending Built-In Elements7:33 Min.
- 18Time to Practice: The Basics - Problem2:55 Min.
- 19Time to Practice: The Basics - Solution11:31 Min.
- 20Debugging0:00 Min.
- 21Wrap Up2:30 Min.
- 22Useful Resources & Links0:00 Min.
4Diving Deeper Into Web Components16 Lektionen · 52 Min.
- 01Module Introduction0:51 Min.
- 02Understanding Shadow DOM Projection2:26 Min.
- 03Styling "slot" Content Outside of the Shadow DOM3:44 Min.
- 04Styling "slot" Content Inside the Shadow DOM3:10 Min.
- 05Styling the Host Component4:42 Min.
- 06Styling Components from Outside0:00 Min.
- 07Conditional Host Styling2:49 Min.
- 08Styling with the Host Content in Mind2:27 Min.
- 09Smart Dynamic Styling with CSS Variables6:20 Min.
- 10Cleaning Up Our Overall Styling3:22 Min.
- 11Observing Attribute Changes6:17 Min.
- 12Adjusting the Component Behaviour Upon Attribute Changes2:34 Min.
- 13Using "disconnectedcallback"4:40 Min.
- 14Adding a Render Method6:13 Min.
- 15Wrap Up2:33 Min.
- 16Useful Resources & Links0:00 Min.
5Building More Complex Components15 Lektionen · 1 Std., 4 Min.
- 01Module Introduction0:52 Min.
- 02Creating the Basics Modal Component6:33 Min.
- 03Adding the Modal Container2:29 Min.
- 04Styling the Modal Elements5:35 Min.
- 05Adding Some General App Logic3:49 Min.
- 06Opening the Modal via CSS5:23 Min.
- 07Public Methods & Properties6:37 Min.
- 08Understanding Named Slots5:45 Min.
- 09"slotchange" & Getting Access to Slot Content5:10 Min.
- 10Closing the Modal with Modal Buttons7:01 Min.
- 11Dispatching Custom Events3:40 Min.
- 12Configuring Custom Events4:52 Min.
- 13Adding Enhancements & Modal Animations4:50 Min.
- 14Wrap Up1:48 Min.
- 15Useful Resources & Links0:00 Min.
6Stencil - An Introduction9 Lektionen · 21 Min.
- 01Module Introduction1:21 Min.
- 02Using Web Components in Modern Browsers2:35 Min.
- 03Browser Support for Web Components2:27 Min.
- 04Using Web Components in All Browsers0:00 Min.
- 05Creating a Stencil Project2:59 Min.
- 06What is Stencil?3:09 Min.
- 07Stencil.js behind the Scenes0:00 Min.
- 08Diving Into a First Stencil Component6:56 Min.
- 09Wrap Up1:41 Min.
7Stencil - Diving Into the Basics22 Lektionen · 1 Std., 22 Min.
- 01Module Introduction0:35 Min.
- 02Using the Development Server3:19 Min.
- 03MUST READ: Ensuring Correct Imports0:00 Min.
- 04Creating a New Stencil Web Component8:55 Min.
- 05Styling a Stencil Component5:40 Min.
- 06Using Props7:02 Min.
- 07Important: Reflect Props to Attributes0:00 Min.
- 08Configuring Props1:27 Min.
- 09Using Slots & Styling4:54 Min.
- 10Rendering Conditional Content2:08 Min.
- 11Using Attributes for Styling only3:27 Min.
- 12Using Props in Combination with Attributes4:16 Min.
- 13Understanding Mutable Props5:33 Min.
- 14Preparing Tabs3:33 Min.
- 15Adding More Event Listeners4:23 Min.
- 16Using State4:32 Min.
- 17Adding Methods to Components3:40 Min.
- 18Adding a Backdrop5:20 Min.
- 19Time to Practice: Stencil - Problem1:13 Min.
- 20Time to Practice: Stencil - Solution10:04 Min.
- 21Wrap Up1:52 Min.
- 22Useful Resources & Links0:00 Min.
8Advanced Stencil28 Lektionen · 1 Std., 52 Min.
- 01Module Introdution0:38 Min.
- 02Creating a New Component2:48 Min.
- 03Component & API Preparations3:57 Min.
- 04Submitting Forms2:09 Min.
- 05Styling the Component5:49 Min.
- 06HTTP Requests in Components7:43 Min.
- 07Using the API Key2:23 Min.
- 08Accessing the Host Element5:14 Min.
- 09Using References2:52 Min.
- 10Two Way Binding & Input Validation6:32 Min.
- 11Error Handling6:07 Min.
- 12Using the "componentdidload" Lifecycle Hook5:34 Min.
- 13All Lifecycle Hooks5:16 Min.
- 14Using Update Lifecycle Hooks4:41 Min.
- 15Watching Prop Changes4:47 Min.
- 16Creating a New Component5:56 Min.
- 17Styling the New Component1:11 Min.
- 18Outputting a List of Elements6:20 Min.
- 19Styling the List Items2:11 Min.
- 20Emitting Customs Events4:47 Min.
- 21Using the Listen Decorator6:05 Min.
- 22Using Hostdata4:37 Min.
- 23Adding a Loading Spinner3:53 Min.
- 24Embedding Components Into Components4:54 Min.
- 25Using CSS Properties4:32 Min.
- 26Using Stencil.js to Build Entire Apps0:00 Min.
- 27Wrap Up1:25 Min.
- 28Useful Resources & Links0:00 Min.
9Deployment & Publishing13 Lektionen · 37 Min.
- 01Module Introduction0:54 Min.
- 02Using Stencil Config4:59 Min.
- 03Building & Using the Components4:15 Min.
- 04Using Web Components in a Node.js Project2:10 Min.
- 05Publishing to NPM3:24 Min.
- 06Installing NPM Packages1:27 Min.
- 07Using Web Components in an Angular App5:32 Min.
- 08Using Web Components in a React App5:18 Min.
- 09Using Web Components in a Vue App4:31 Min.
- 10Polyfills & The Internet Explorer2:49 Min.
- 11IE & Polyfills0:00 Min.
- 12Wrap Up1:25 Min.
- 13Useful Resources & Links0:00 Min.
10Roundup2 Lektionen · 3 Min.
- 01Roundup2:58 Min.
- 02Useful Resources & Links0:00 Min.
Bereit loszulegen?
Kaufe diesen Kurs auf Academind Pro oder hol dir mit All Access auf Academind Infinite alle Kurse.
Dieser Kurs auf Academind Pro
69 $einmalig
Inkl. MwSt. · 30 Tage Geld-zurück-Garantie
- Lebenslanger Zugriff auf diesen Kurs
- Alle künftigen Updates dieses Kurses
- Downloads, Code und ein Zertifikat
All Access auf Academind Infinite
25 $im Monat
oder
249 $249 $ im JahrSpare 17 %- Jeder Kurs, mit allen Funktionen
- Neue Kurse, sobald sie kommen
- Dein Tutor, mit allen Funktionen
All Access enthält außerdem jeden Academind Pro-Kurs.