Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
VueではじめるWeb Components
Search
hitsuji-haneta
September 06, 2019
Programming
610
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VueではじめるWeb Components
hitsuji-haneta
September 06, 2019
Transcript
18 slides
Vue Web components ではじめる
自己紹介 高橋翔太 hitsuji-haneta thinkShake製作所 代表 LasTrust株式会社 CTO h1tsuj1_haneta
突然ですが皆さん
ってご存知ですか?? Web components
ライブラリなしで HTMLコンポーネント をカスタムできる ブラウザでサポート
Custom Elements Shadow DOM HTML Template
例 const template = document.createElement('template'); template.innerHTML = ` <style>…</style> <div>…</div>
`; class Button extends HTMLElement { constructor() { … this.$button .addEventListener('click', () => { console.log(this.message); }); } … } window .customElements .define(‘my-button', Button); my-button.js <script type=“module" src=“./my-button.js”> </script> <div> <h1>hello</h1> <my-button label=“hello” message=“world"> </my-button> </div> hoge.html
動かしてみると
vueの勉強会 なんですけど?
૬ੑൈ܈ʂ
メリット MyButton
メリット MyButton どんなフレームワークでも 使えちゃう
なぜ調べたか? BCライブラリ群 UI シンプルに使いたい…
<template> <div id="app"> <my-button label="hello" message=“world"/> </div> </template> <script> import
‘./components/my-button’; export default { ... }; </script> <style> ... </style> hoge.vue
ͪΐʔ؆୯
$ vue-cli-service build --target wc —-name my- button ./MyButton.vue <script
src=“https://unpkg.com/vue"></script> <script type=“module src=“./dist/my-button.js”> </script> <div> <h1>hello</h1> <my-button label=“hello” message=“world"> </my-button> </div> hoge.html
Vue Web components で はじめてみませんか?
ありがとうございました
More Decks by hitsuji-haneta
See All by hitsuji-haneta
SSIで覗き見るPWAの世界 / SSI on PWA
hitsuji_haneta
2
1.2k
GoとMicroserviceでDDDやってみました
hitsuji_haneta
0
430
やってみたよVueNative
hitsuji_haneta
2
520
これもフロントエンド!画面つきスピーカーで遊んでみた
hitsuji_haneta
0
120
webエンジニア向けブロックチェーンの技術的「へぇ」 / Blockchain tech tips for web developers
hitsuji_haneta
0
180
Other Decks in Programming
See All in Programming
Debian JP Projectのサーバー構成
uwabami
1
190
Datadog を OTel にするメリットを考察する — Datadog との併用を実アプリで確かめる / Examining the Benefits of Moving Datadog to OTel — Testing OTel Alongside Datadog in a Real App
seike460
PRO
1
110
The Cost of the DOM
ypresto
3
1.2k
ruby/uri meets WHATWG
jinroq
0
180
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
230
SODA - FACT BOOK(EN)
sodainc
1
300
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
120
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
270
テスト駆動開発から学ぶ 達人プログラマーの型 / TechRAMEN 2026 Conference
a_okui
0
3.2k
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
240
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
240
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Writing Fast Ruby
sferik
630
63k
The SEO Collaboration Effect
kristinabergwall1
1
630
How STYLIGHT went responsive
nonsquared
100
6.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
Google's AI Overviews - The New Search
badams
0
1.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Test your architecture with Archunit
thirion
2
2.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
320