メインコンテンツへスキップ
Academind
すべてのコース

Academind Proのコース

Web Components & Stencil.js - Build Custom HTML Elements

A Complete Introduction to building Custom HTML Elements/ Web Components with and without StencilJS

  • 10セクション · 147件のレクチャー
  • 合計8 時間 45 分
Web Components & Stencil.js - Build Custom HTML Elements

このコースについて

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.

学べること

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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).

前提条件

  • 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.

このコースの対象者

  • 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.

カリキュラム

始める前に、このコースの構成とペースをご確認ください。

  1. 1Introduction9件のレクチャー · 27 分
    1. 01Introduction1:38分
    2. 02Web Components - A Quick Demo6:30分
    3. 03What are Web Components3:22分
    4. 04Join our Online Learning Community0:00分
    5. 05Why Do We Use Web Components?3:05分
    6. 06Comparing Web Components & Frameworks6:15分
    7. 07Course Outline2:46分
    8. 08How To Get The Most Out Of The Course3:04分
    9. 09The Academind Pro Referral Program0:00分
  2. 2Refreshing Next Generation JavaScript (Optional)11件のレクチャー · 35 分
    1. 01Module Introduction1:12分
    2. 02Understanding "let" and "const"3:05分
    3. 03Working with Arrow Functions5:27分
    4. 04Exports and Imports4:43分
    5. 05Understanding Classes4:30分
    6. 06Classes, Properties and Methods3:03分
    7. 07The Spread & Rest Operator6:27分
    8. 08Refreshing Array Functions2:32分
    9. 09JS Array Functions2:32分
    10. 10Understanding Async Code1:04分
    11. 11Next-Gen JavaScript - Summary0:00分
  3. 3Understanding the Basics22件のレクチャー · 1 時間 32 分
    1. 01Module Introduction - What are Web Components?5:07分
    2. 02Browser Support3:05分
    3. 03Our Development Setup4:38分
    4. 04Creating our First Custom Element8:28分
    5. 05Interacting with the Surrounding DOM5:04分
    6. 06Understanding the Custom Elements Lifecycle2:51分
    7. 07Using "connectedcallback" for DOM Access2:05分
    8. 08Listening to Events Inside the Component8:52分
    9. 09Using Attributes on Custom Elements4:45分
    10. 10"Attributes" vs "Properties"0:00分
    11. 11Styling our Elements4:08分
    12. 12Using the Shadow DOM5:00分
    13. 13Adding an HTML Template5:40分
    14. 14Using Slots1:50分
    15. 15Defining the Template in JavaScript3:29分
    16. 16Using Style Tags in the Shadow DOM2:40分
    17. 17Extending Built-In Elements7:33分
    18. 18Time to Practice: The Basics - Problem2:55分
    19. 19Time to Practice: The Basics - Solution11:31分
    20. 20Debugging0:00分
    21. 21Wrap Up2:30分
    22. 22Useful Resources & Links0:00分
  4. 4Diving Deeper Into Web Components16件のレクチャー · 52 分
    1. 01Module Introduction0:51分
    2. 02Understanding Shadow DOM Projection2:26分
    3. 03Styling "slot" Content Outside of the Shadow DOM3:44分
    4. 04Styling "slot" Content Inside the Shadow DOM3:10分
    5. 05Styling the Host Component4:42分
    6. 06Styling Components from Outside0:00分
    7. 07Conditional Host Styling2:49分
    8. 08Styling with the Host Content in Mind2:27分
    9. 09Smart Dynamic Styling with CSS Variables6:20分
    10. 10Cleaning Up Our Overall Styling3:22分
    11. 11Observing Attribute Changes6:17分
    12. 12Adjusting the Component Behaviour Upon Attribute Changes2:34分
    13. 13Using "disconnectedcallback"4:40分
    14. 14Adding a Render Method6:13分
    15. 15Wrap Up2:33分
    16. 16Useful Resources & Links0:00分
  5. 5Building More Complex Components15件のレクチャー · 1 時間 4 分
    1. 01Module Introduction0:52分
    2. 02Creating the Basics Modal Component6:33分
    3. 03Adding the Modal Container2:29分
    4. 04Styling the Modal Elements5:35分
    5. 05Adding Some General App Logic3:49分
    6. 06Opening the Modal via CSS5:23分
    7. 07Public Methods & Properties6:37分
    8. 08Understanding Named Slots5:45分
    9. 09"slotchange" & Getting Access to Slot Content5:10分
    10. 10Closing the Modal with Modal Buttons7:01分
    11. 11Dispatching Custom Events3:40分
    12. 12Configuring Custom Events4:52分
    13. 13Adding Enhancements & Modal Animations4:50分
    14. 14Wrap Up1:48分
    15. 15Useful Resources & Links0:00分
  6. 6Stencil - An Introduction9件のレクチャー · 21 分
    1. 01Module Introduction1:21分
    2. 02Using Web Components in Modern Browsers2:35分
    3. 03Browser Support for Web Components2:27分
    4. 04Using Web Components in All Browsers0:00分
    5. 05Creating a Stencil Project2:59分
    6. 06What is Stencil?3:09分
    7. 07Stencil.js behind the Scenes0:00分
    8. 08Diving Into a First Stencil Component6:56分
    9. 09Wrap Up1:41分
  7. 7Stencil - Diving Into the Basics22件のレクチャー · 1 時間 22 分
    1. 01Module Introduction0:35分
    2. 02Using the Development Server3:19分
    3. 03MUST READ: Ensuring Correct Imports0:00分
    4. 04Creating a New Stencil Web Component8:55分
    5. 05Styling a Stencil Component5:40分
    6. 06Using Props7:02分
    7. 07Important: Reflect Props to Attributes0:00分
    8. 08Configuring Props1:27分
    9. 09Using Slots & Styling4:54分
    10. 10Rendering Conditional Content2:08分
    11. 11Using Attributes for Styling only3:27分
    12. 12Using Props in Combination with Attributes4:16分
    13. 13Understanding Mutable Props5:33分
    14. 14Preparing Tabs3:33分
    15. 15Adding More Event Listeners4:23分
    16. 16Using State4:32分
    17. 17Adding Methods to Components3:40分
    18. 18Adding a Backdrop5:20分
    19. 19Time to Practice: Stencil - Problem1:13分
    20. 20Time to Practice: Stencil - Solution10:04分
    21. 21Wrap Up1:52分
    22. 22Useful Resources & Links0:00分
  8. 8Advanced Stencil28件のレクチャー · 1 時間 52 分
    1. 01Module Introdution0:38分
    2. 02Creating a New Component2:48分
    3. 03Component & API Preparations3:57分
    4. 04Submitting Forms2:09分
    5. 05Styling the Component5:49分
    6. 06HTTP Requests in Components7:43分
    7. 07Using the API Key2:23分
    8. 08Accessing the Host Element5:14分
    9. 09Using References2:52分
    10. 10Two Way Binding & Input Validation6:32分
    11. 11Error Handling6:07分
    12. 12Using the "componentdidload" Lifecycle Hook5:34分
    13. 13All Lifecycle Hooks5:16分
    14. 14Using Update Lifecycle Hooks4:41分
    15. 15Watching Prop Changes4:47分
    16. 16Creating a New Component5:56分
    17. 17Styling the New Component1:11分
    18. 18Outputting a List of Elements6:20分
    19. 19Styling the List Items2:11分
    20. 20Emitting Customs Events4:47分
    21. 21Using the Listen Decorator6:05分
    22. 22Using Hostdata4:37分
    23. 23Adding a Loading Spinner3:53分
    24. 24Embedding Components Into Components4:54分
    25. 25Using CSS Properties4:32分
    26. 26Using Stencil.js to Build Entire Apps0:00分
    27. 27Wrap Up1:25分
    28. 28Useful Resources & Links0:00分
  9. 9Deployment & Publishing13件のレクチャー · 37 分
    1. 01Module Introduction0:54分
    2. 02Using Stencil Config4:59分
    3. 03Building & Using the Components4:15分
    4. 04Using Web Components in a Node.js Project2:10分
    5. 05Publishing to NPM3:24分
    6. 06Installing NPM Packages1:27分
    7. 07Using Web Components in an Angular App5:32分
    8. 08Using Web Components in a React App5:18分
    9. 09Using Web Components in a Vue App4:31分
    10. 10Polyfills & The Internet Explorer2:49分
    11. 11IE & Polyfills0:00分
    12. 12Wrap Up1:25分
    13. 13Useful Resources & Links0:00分
  10. 10Roundup2件のレクチャー · 3 分
    1. 01Roundup2:58分
    2. 02Useful Resources & Links0:00分

始める準備はできましたか?

このコースをAcademind Proで購入するか、Academind InfiniteのAll Accessですべてのコースを利用しましょう。

ブラックフライデー: All Access 1年分が $249 $249 · までの限定価格セール価格で購入する
  • Academind Proでこのコースを購入

    $69買い切り

    税込 · 30日間返金保証

    • このコースへの無期限アクセス
    • このコースの今後のアップデートすべて
    • ダウンロード資料、コード、修了証
    Web Componentsを購入
  • Academind InfiniteのAll Access

    $25/月

    または$249 $249 /年17%お得

    • すべてのコースを、すべての機能付きで
    • 新しいコースも随時追加
    • チューター(すべての機能)
    All Accessを始める

All Accessには、Academind Proのすべてのコースも含まれます。

Academind ProとAcademind Infinite

コースもログインもそれぞれ別の、2つのプラットフォームです。

Academind Pro

pro.academind.comにある、これまでのコースプラットフォームです。Proのサブスクリプションとご購入のコースは、引き続きProでご利用いただけます。

Academind Proにログイン

Academind Infinite

AIファーストの新しいプラットフォームです。ProメンバーはProのアカウントでログインできます。Pro All AccessにはInfiniteも含まれ、すべてのコースを受講できます。

Academind Infiniteにログイン

Proのアカウントをお持ちか、Proでコースをご購入済みですか?

Infiniteに移ったのは、Proのコースの一部だけです。お持ちのコースを選んで、Infiniteでのページを開いてください。