Skip to content
Playground

DaisyUI v4

Installation

Terminal window
npm i @sjsf/basic-theme@next @sjsf/daisyui-theme@next

Install daisyUI

Install daisyUI as a Tailwind CSS plugin

Setup styles

There is two ways to setup styles:

  1. Use tailwindcss config
import daisyui from 'daisyui';
import { THEME_CONTENT } from '@sjsf/daisyui-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}', THEME_CONTENT],
plugins: [daisyui],
}
  1. Inject prepared styles (not recommended)
// Inject them as you like
import daisyStyles from "@sjsf/daisyui-theme/styles.css?inline";

Extra widgets

  • checkboxes
  • date-picker
  • file
  • multi-select
  • radio-buttons
  • radio
  • range
  • switch
  • textarea

Widgets demo