Getting started

Sépale is a set of components: each one a DOM structure and a few well-defined classes, and in Svelte a wrapper that puts it in a page in one line. How they look is a separate choice, a family: one stylesheet, tuned by a theme. Change the stylesheet and every component changes with it; the markup never does.

Install

Two packages. @sepale/style holds the families and their themes, as plain CSS. @sepale/components holds the Svelte 5 components; they load no CSS of their own.

npm install @sepale/components @sepale/style

Load a family and a theme

Import them once, in your root layout. The reset is optional: no family depends on it. The family comes first, the theme after it.

src/routes/+layout.svelte
<script>
  import '@sepale/style/reset.css';              /* optional */
  import '@sepale/style/daisy.css';              /* the family: every component */
  import '@sepale/style/daisy/themes/light.css'; /* one of its themes */
</script>

Importing the stylesheet does more than style the page: it also narrows the components' types to what this family draws. A variant daisy does not ship becomes a compile error. See Svelte components.

Use the components

<script>
  import { Button, Input, Dialog } from '@sepale/components';
  let open = $state(false);
</script>

<Input placeholder="Your name" />
<Button color="primary" onclick={() => (open = true)}>Save</Button>

<Dialog bind:open title="Saved">Your name is kept.</Dialog>

Each prop that picks a look — color, size, variant — writes one class, btn-primary here. The component pages list them all, for the family picked in the sidebar.

Without Svelte

The families are plain CSS. Any page can write the classes by hand; the DOM tab of each component page shows the structure to write.

<link rel="stylesheet" href="daisy.css" />
<link rel="stylesheet" href="light.css" />

<button class="btn btn-primary btn-sm">Save</button>
<span class="badge badge-success">Paid</span>

Packages or a download

  • The packages follow the kit: a fix or a new component reaches you with an update. Their public API — parameters, classes, props — follows semver.
  • A bundle, downloaded from the theme generator, is a snapshot: the family's stylesheet, your tuned theme.css, and, if you want them, the components rewritten for that family alone. It never updates. A bundle can also be only a theme.css, laid over the package's family.

Next

Pick a family and a theme in the sidebar: every page of this site redraws with them. Then read how families and themes work.