@sjsf/daisyui-theme
v3.0.0
Published
The daisyUI based theme for svelte-jsonschema-form
Downloads
212
Readme
@sjsf/daisyui-theme
The daisyUI v4 based theme for svelte-jsonschema-form.
Installation
npm install @sjsf/form @sjsf/daisyui-themeUsage
Setup styles
There is two ways to setup styles:
- 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],
}Or with a preset
import themePreset from '@sjsf/daisyui-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
presets: [themePreset],
}- Inject prepared styles (not recommended)
// Inject them as you like
import themeStyles from "@sjsf/daisyui-theme/styles.css?inline";Apply theme
<script lang="ts">
import { createForm } from '@sjsf/form';
import { theme } from '@sjsf/daisyui-theme';
const form = createForm({
theme,
...
})
</script>License
MIT
