- Preface
- Prerequisites
- Conventions Used in This Book
- Suggested Reading Paths
- Part I — Foundations of Web Components
- Chapter 1: Why Web Components?
- Chapter 2: Custom Elements 101
- Chapter 3: Shadow DOM Deep Dive
- Chapter 4: Templates, Slots & Composition Patterns
- Chapter 5: ES Modules & Component Delivery
- Part II — Web Components with Vanilla JavaScript
- Chapter 6: Building Robust Components from Scratch
- Chapter 7: Events & Communication
- Chapter 8: Forms, Focus & ElementInternals
- Chapter 9: Styling Strategies for Vanilla Components
- Chapter 10: Accessibility for Web Components
- Chapter 11: Scoped Custom Element Registries
- Chapter 12: Vanilla Capstone — A Mini Component Library
- Part III — Design System Fundamentals
- Chapter 13: What a Design System Really Is
- Chapter 14: Design Tokens
- Chapter 15: Component API Design
- Chapter 16: The Design System Development Process
- Part IV — Case Study: Building the Prism Design System
- Chapter 17: Project Setup & Foundations
- Chapter 18: Building the Core Components — Form Controls
- Chapter 19: System-Level Concerns
- Part V — Testing, Tooling, Distribution & Adoption
- Chapter 20: Testing Web Components
- Chapter 21: Packaging, Publishing & Versioning
- Chapter 22: Adoption, Interop & the Road Ahead
- Part VI — Agentic Design Systems
- Chapter 23: Design Systems in the Age of Agents
- Chapter 24: MCP for Design Systems
- Chapter 25: Encoding System Knowledge — Skills, Rules & Context
- Chapter 26: Agent-Assisted Design System Workflows
- Chapter 27: Evaluating & Governing Agent Output
- Appendices
- Appendix A: Web Component API Quick Reference
- Appendix B: Design System Checklists & Templates
- Appendix C: Agent-Readiness Reference
- Code for This Book
- Glossary
- About the Author
- Index
Web Components & Design Systems
Built for Humans, Engineered to Be Agent-Ready
Build a real, production-grade design system on the web platform — Prism DS, from a single custom element to an AI-agent-ready component library — with every example tested in a real browser before it made it into the book.
Minimum price
$19.00
$25.00
You pay
Buying multiple copies for your team? See below for a discount!
About
About the Book
Web Components & Design Systems teaches you to build durable, framework-agnostic UI on the platform itself, through one running project: Prism DS, a genuinely real design system built up chapter by chapter — design tokens, themed components, an accessible form-control library, a component manifest, a documentation pipeline, and (in the book's second half) an MCP server that lets an AI coding agent consume your design system correctly instead of guessing at it.
You don't need prior web-components experience — Part I starts from the platform's own primitives (custom elements, shadow DOM, templates and slots). You do need to be comfortable with JavaScript and the DOM already.
What's inside:
- Custom elements, shadow DOM, and templates — not the folklore version, the current one
- Building robust, accessible, form-associated components with ElementInternals
- Design tokens with the DTCG spec and Style Dictionary
- Styling strategy: adopted stylesheets, ::part, custom states, container queries
- Testing, packaging, versioning, and publishing web components for real consumers
- Scoped custom element registries — and the exact collision bug they fix
- Design-system process: adoption, governance, and what teams actually measure (and don't)
- Part VI: agent-assisted workflows, MCP servers, and evaluating AI-generated component code
458 pages. Twenty-seven chapters plus three reference appendices. Every runnable example ships as a companion code download.
Feedback
Team Discounts
Team Discounts
Get a team discount on this book!
Up to 3 members
- Minimum price
- $47.00
- Suggested price
- $72.00
Up to 5 members
- Minimum price
- $76.00
- Suggested price
- $116
Up to 10 members
- Minimum price
- $133
- Suggested price
- $203
Up to 15 members
- Minimum price
- $190
- Suggested price
- $290
Up to 25 members
- Minimum price
- $285
- Suggested price
- $435
Author
About the Author
Sandeep Kumar Patel is a senior web developer and founder of
, a widely- read programming blog since 2012. He has more than six years of experience in object-oriented JavaScript and JSON-based web applications development. He is GATE-2005 Information Technology (IT) qualified and has a Masters degree from VIT University, Vellore
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
About the Publisher
About the Publisher
This book is published on Leanpub by Tutorial Savvy
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.