0.0.1 • Published 6 months ago

shadsv-beta v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

shadsv-beta

Shadcn-style components for Svelte 5.

Installation

npm install shadsv-beta

Setup

  1. First, update your tailwind.config.ts (or .js):
import { type Config } from 'tailwindcss'
import { tailwindPreset } from 'shadsv-beta'

export default {
  presets: [tailwindPreset],
  content: [
    "./src/**/*.{html,js,svelte,ts}",
    "./node_modules/shadsv-beta/**/*.{html,js,svelte,ts}"
  ],
} satisfies Config
  1. Create or update your app.css (or equivalent main CSS file):
/* Import the library styles first */
@import 'shadsv-beta/styles.css';

/* Then add your own styles */
@tailwind base;
@tailwind components;
@tailwind utilities;
  1. Make sure you have the required peer dependencies:
npm install -D tailwindcss @tailwindcss/typography @tailwindcss/forms @tailwindcss/container-queries

Usage

<script>
  import { Button } from 'shadsv-beta';
</script>

<Button variant="default">Click me</Button>

Components

List of available components and their usage...