Skip to content
Svelte DocSmith
3 min read

Quick start

Install Acme UI, add your first component, and theme it in five minutes.

Acme UI is a set of accessible components for Svelte. Every surface reads the theme’s tokens, so the whole library follows your brand. New Beta

Install

			pnpm add acme-ui
		

Configure

Register the plugin in your Vite config. Press ⌘ K to search the docs at any time.

vite.config.ts
			import { defineConfig } from 'vite';
import { acme } from 'acme-ui/vite';

// Options are checked when Vite starts.
export default defineConfig({
	plugins: [acme({ theme: './src/theme.css', strict: true, port: 5173 })]
});
		

Good to know

The theme file is plain CSS, so your editor’s colour picker works on it.

Your first component

Import it

src/routes/+page.svelte
			<script lang="ts">
	import { Button } from 'acme-ui';
	let count = $state(0);
</script>

<Button onclick={() => count++}>Clicked {count} times</Button>
		

Run the dev server

Start pnpm dev and open the page.

Breaking change

theme replaced themes in 2.0. The old option still works with a warning.

Options

OptionTypeDefaultDescription
themestring'default'A preset name or a theme file path.
strictbooleanfalseFail the build on a missing token.
portnumber5173The dev server port.

Don't

Edit the generated files by hand; they’re rewritten on every build.