svelte-tailwind Svelte Themes

Svelte Tailwind

Collection of reusable svelte components designed with tailwind css

Svelte Tailwind

A collection of reusable svelte components designed with tailwind css.

Installation

npm create svelte@latest newProject
npm i -D @codepiercer/svelte-tailwind
  • Setup

    // tailwind.config.cjs
    module.exports {
      presets: require('@codepiercer/svelte-tailwind/config.cjs')
    }
    
    // postcss.config.cjs
    module.exports = {
      plugins: {
        tailwindcss: {},
        autoprefixer: {}
      }
    }
    

(or) Use the pre configured template

npx degit [email protected]:codepiercer/sveltekit-template.git newProject

Usage

// Example.svelte
<script>
  import { Button } from '@codepiercer/svelte-tailwind'
</script>

<Button color="yellow" variant="secondary">Click Me</Button>

© CODEPIERCER. All rights reserved.

Top categories

Loading Svelte Themes