Skip to content

Latest commit

 

History

History
115 lines (92 loc) · 2.8 KB

README.md

File metadata and controls

115 lines (92 loc) · 2.8 KB

Flowbite Svelte Blocks

Flowbite Svelte Blocks

npm Created by Shin Okada License

⚠️ Flowbite-Svelte-Blocks is currently in early development and APIs and packages are likely to change quite often.

Demo

Flowbite Svelte Blocks

Installation

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;

Update tailwind.config.cjs

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'
  ]
    }
  },