A collection of reusable svelte components designed with tailwind css.
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: {} } }
npx degit [email protected]:codepiercer/sveltekit-template.git newProject
// Example.svelte
<script>
import { Button } from '@codepiercer/svelte-tailwind'
</script>
<Button color="yellow" variant="secondary">Click Me</Button>
© CODEPIERCER. All rights reserved.