@sjsf/skeleton-theme
v1.6.1
Published
The skeleton based theme for svelte-jsonschema-form
Downloads
749
Readme
@sjsf/skeleton-theme
The skeleton based theme for svelte-jsonschema-form.
Installation
npm install @sjsf/form @sjsf/skeleton-theme
Usage
Setup styles
There is two ways to setup styles:
- Use tailwindcss config
import { skeleton } from '@skeletonlabs/skeleton/plugin';
import * as themes from '@skeletonlabs/skeleton/themes';
import forms from '@tailwindcss/forms'
import { THEME_CONTENT } from '@sjsf/skeleton-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}', THEME_CONTENT],
plugins: [
forms,
skeleton({
themes: [/* themes.something */],
})
],
}
Or with a preset
import themePreset from '@sjsf/skeleton-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
presets: [themePreset],
}
- Inject prepared styles (not recommended)
// Inject them as you like
import themeStyles from "@sjsf/skeleton-theme/styles.css?inline";
Bundled themes:
cerberus
catppuccin
pine
rose
Apply theme
<script lang="ts">
import { useForm2 } from '@sjsf/form';
import { theme } from '@sjsf/skeleton-theme';
const form = useForm2({
...theme,
})
</script>
License
MIT