Getting Started

Getting Started

Prerequisites

Sax Design Vue targets Vue 3.3+ with a modern bundler (Vite recommended). Install Vue first, then add the component library.

Installation

Copied
pnpm add vue sax-design-vue

Register globally

Copied
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.

Dark / light theme

Toggle the dark class on the html element:

Copied
document.documentElement.classList.toggle('dark')

Or use @vueuse/core:

Copied
import { useDark, useToggle } from '@vueuse/core'

const isDark = useDark()
const toggleDark = useToggle(isDark)

On-demand components

Copied
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.

Try online first

Open the Playground to preview components before wiring them into your app.

Last Updated: 2026-10-28, 06:17:56 UTC
Copied