© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
A. LibbyDeveloping Web Components with Svelte https://doi.org/10.1007/978-1-4842-9039-2_2

2. Creating Basic Components

Alex Libby1  
(1)
Belper, Derbyshire, UK
 

With our initial project set up, it’s time to start creating and adding components!

For this (and the next few chapters), we will build some sample components ready for inclusion in our library. We could have chosen to include any one of dozens of different components, but to keep things simple, I’ve decided to pick three to start with: Input box, Checkbox, and Slider.

For each component, I’ve made a few assumptions in terms of how we will develop these components:
  • Use HTML5 tags where possible.

  • Aim to use ...

Get Developing Web Components with Svelte: Building a Library of Reusable UI Components now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.