This context provides information about 10 popular Svelte UI components, including Flowbite-Svelte, Svelte Material UI, Carbon Components Svelte, Smelte, Sveltestrap, Svelma, Attractions, Svelte-mui, Svelte-chota, and Framework7 Svelte.
Abstract
The article discusses 10 popular Svelte UI components that can be used for various projects. Each component is briefly introduced, along with its features, GitHub summary, quick start guide, and references. The components include Flowbite-Svelte, Svelte Material UI, Carbon Components Svelte, Smelte, Sveltestrap, Svelma, Attractions, Svelte-mui, Svelte-chota, and Framework7 Svelte. The author provides installation instructions, code examples, and links to documentation for each component. The article concludes by encouraging readers to explore different UI kits and highlighting the benefits of using Svelte for web development.
Bullet points
The article introduces 10 popular Svelte UI components.
Each component is briefly introduced with its features, GitHub summary, quick start guide, and references.
The components include Flowbite-Svelte, Svelte Material UI, Carbon Components Svelte, Smelte, Sveltestrap, Svelma, Attractions, Svelte-mui, Svelte-chota, and Framework7 Svelte.
The author provides installation instructions, code examples, and links to documentation for each component.
The article concludes by encouraging readers to explore different UI kits and highlighting the benefits of using Svelte for web development.
10 Popular Svelte UI Components
Find your favorite CSS framework for your Svelte project
A 2021 Stackoverflow survey found that Svelte is the most loved web framework for developers. It is easy to learn and beginner-friendly. Svelte compiles your code into tiny, framework-less vanilla JS that makes your app fast and reactive.
In this article, you will find the ten most popular Svelte UI components that you can use for your next projects.
Flowbite-Svelte
Disclaimer: I’m the author of Flowbite-Svelte.
Flowbite-svelte website screenshot. Image by the author.
Flowbite-Svelte is an official Flowbite component library for Svelte. Flowbite is the most popular open-source library of interactive UI components built with the utility classes from Tailwind CSS. Flowbite-Svelte has more than 100 components including dark-mode, buttons, modals, cards, navbar, accordions, alerts, tabs, and more.
Getting started page shows you how to install Flowbite-Svelte.
Svelte Material UI is based on Material Design Components. It has full TypeScript support, arbitrary attributes to all of the components, actions to the components, and more.
Svelte Material UI GitHub summary
Quick start
# Install the packages you neednpm install --save-dev @smui/top-app-bar
npm install --save-dev @smui/button
npm install --save-dev @smui/card
# only for SvelteKit# npm install --save-dev smui-theme
Smelte is built on top of Tailwind CSS using Material Design spec. It offers many components and utility functions.
Smelte GitHub summary
Quick start
$ npm install smelte
# or$ yarn add smelte
Add the following to rollup.config.js.
const smelte=require("smelte/rollup-plugin-smelte");plugins=[
...your plugins,
smelte({ purge: production,
output:"public/global.css", // it defaults to static/global.css which is probably what you expect in Sapper postcss: [], // Your PostCSS plugins whitelist: [], // Array of classnames whitelisted from purging whitelistPatterns: [], // Same as above, but list of regexes tailwind:{ colors:{ primary:"#b027b0",
secondary:"#009688",
error:"#f44336",
success:"#4caf50",
alert:"#ff9800",
blue:"#2196f3",
dark:"#212121"}, // Object of colors to generate a palette from, and then all the utility classes darkMode: true,
},
// Any other props will be applied on top of default Smelte tailwind.config.js}),
]
Add the following to the main.js.
import "smelte/src/tailwind.css";
If you need to use material icons add the following:
Attractions is a stylish and functional UI kit for Svelte. It weighs only 239 KB and is tree-shaking-enabled. It works with SASS and accessibility is included.
Svelte-mui is inspired by Material Design and it has ~30KB mini-zipped. The last update was 10 months ago.
Svelte-mui doc homepage screenshot.
Svelte-mui GitHub summary
Quick start
Install svelte-muk:
$ npm install --save-dev svelte-mui
Use it in components:
<Textfieldbind:valuefilledlabel="Name"message="Enter your name" /><h1>Hello {value}!</h1><script>// import any components you wantimport{ Textfield }from'svelte-mui';
let value = 'world';
</script>
Svelte-chota is based on Chota CSS framework. Chota is a super lightweight CSS framework. Minified files is just ~3kb. The last update was 4 months ago.
I recently found that Framework7 has a whole section on Svelte. You can find a HackerNews clone powered by Framework7 and Svelte. Framework7 Svelte provides all components from App to Virtual List.
If you already know Framework7, this might be the way to go.
Conclusion
You can start with a UI component that you are familiar with or learn a new CSS framework. Svelte makes it easy for you to start using a template or SvelteKit.
You can explore different UI kits on the Svelte Society page if you can’t find something you like.
Since Svelte compiles your files and deploys without a framework it has excellent performance compared to React, Vue, and Angular.
It is easy to learn and beginner-friendly for programmers.
If you know other Svelte UI components, please let me know.