⚠️ Flowbite-Svelte-Blocks is currently in early development and APIs and packages are likely to change quite often.
This library is built on top of Flowbite-Svelte and Flowbite-Svelte-Icons. Flowbite-Svelte is an official Flowbite component library for Svelte.
Install SvelteKit:
npm create svelte@latest your-project-name
cd your-project-name
pnpm install
Install Tailwind CSS:
npx svelte-add@latest tailwindcss
pnpm i
Start a server:
pnpm run dev
Install flowbite-svelte-blocks:
pnpm i flowbite-svelte flowbite-svelte-blocks flowbite-svelte-icons
Update tailwind.config.cjs:
const config = {
content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}', './node_modules/flowbite-svelte-blocks/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: [require('flowbite/plugin')],
darkMode: 'class'
};
module.exports = config;
Current theme
config is the following. You can update primary
color and other config.
theme: {
extend: {
colors: {
primary: {"50":"#fff1f2","100":"#ffe4e6","200":"#fecdd3","300":"#fda4af","400":"#fb7185","500":"#f43f5e","600":"#e11d48","700":"#be123c","800":"#9f1239","900":"#881337"}
}
},
fontFamily: {
'body': [
'Inter',
'ui-sans-serif',
'system-ui',
'-apple-system',
'system-ui',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji'
],
'sans': [
'Inter',
'ui-sans-serif',
'system-ui',
'-apple-system',
'system-ui',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji'
]
}
},