Prerequisites
Sax Design Vue targets Vue 3.3+ with a modern bundler (Vite recommended). Install Vue first, then add the component library.
Sax Design Vue targets Vue 3.3+ with a modern bundler (Vite recommended). Install Vue first, then add the component library.
import { createApp } from 'vue'
import SaxDesignVue from 'sax-design-vue'
import App from './App.vue'
import 'sax-design-vue/theme-chalk/index.css'
createApp(App).use(SaxDesignVue).mount('#app')
The default stylesheet includes dark theme variables. Toggle the dark class on <html> to switch themes at runtime. The standalone theme-chalk/dark/css-vars.css entry remains available for compatibility.
Toggle the dark class on the html element:
document.documentElement.classList.toggle('dark')
Or use @vueuse/core:
import { useDark, useToggle } from '@vueuse/core'
const isDark = useDark()
const toggleDark = useToggle(isDark)
import { createApp } from 'vue'
import { SAlert, SButton } from 'sax-design-vue'
import App from './App.vue'
import 'sax-design-vue/theme-chalk/index.css'
createApp(App).use(SAlert).use(SButton).mount('#app')
See Using Components for resolver / auto-import setup.
Open the Playground to preview components before wiring them into your app.