Ready-to-use themes for Bref-ui, built with Svelte 5, native HTML and scoped CSS. Pick a visual style and compose familiar Bref components through a dedicated theme entry point.
Explore the theme galleries for component examples and interaction states, or browse the Bref-ui documentation.
bref-ui-demo.mp4
See New Paris shopping, the ADE workbench with VS Code styling and a Glassy workspace in action. The video app and storyboard are part of this repository.
| Theme | Style | Import |
|---|---|---|
| New Paris | Black and ivory, serif headings, paper overlays | bref-ui-themes/new-paris |
| Glassy | Translucent controls and frosted overlays | bref-ui-themes/glassy |
| Crystal Code | Light and dark frosted workbench | bref-ui-themes/crystal-code |
| VS Code | Fixed-dark workbench | bref-ui-themes/vscode |
Each entry point exports twenty components, including Theme, Button, form
controls, overlays and navigation. Importing one theme does not load the others.
Install bref-ui-themes from npm in a Svelte 5 app:
npm install bref-ui bref-ui-themes
Bref-ui 3 and Svelte 5 are peer dependencies. The custom text font remains optional.
Import components from the theme's entry point:
<script> import { Theme, Button } from 'bref-ui-themes/new-paris'; </script> <Theme><Button label="Save" /></Theme>
Every prebuilt Theme accepts the core ThemeProps from bref-ui/types:
optional children?: Snippet and palette?: Palette | { light: Palette; dark: Palette }.
Palette is a partial map of semantic colors to CSS hex values: primary,
secondary, background, foreground, muted, info, success, warning, error.
Invalid hex values throw, as in core Theme.
<script lang="ts"> import { Theme as CrystalCodeTheme, Button } from 'bref-ui-themes/crystal-code'; import type { Palette } from 'bref-ui/types'; const palette = { primary: '#6750a4' } satisfies Palette; </script> <CrystalCodeTheme {palette}><Button label="Save" /></CrystalCodeTheme>
A shared palette applies to both modes. For separate overrides, pass
palette={{ light: { primary: '#6750a4' }, dark: { primary: '#d0bcff' } }}.
Each mode merges only its supplied colors with that theme's defaults. Omitted
colors retain the original appearance; private material and typography tokens
remain theme-specific. Check contrast when choosing custom colors. Overrides stay on the instance, including nested themes,
and do not alter sibling themes or core Theme.
Use ThemeModeToggle to select light, dark or auto through the existing
color-scheme metadata. Local [data-theme="light"], [data-theme="dark"] and
[data-theme="auto"] containers select the mode for their nested prebuilt themes;
the nearest container wins. Without a mode selection, Crystal Code follows the
system, New Paris and Glassy stay light, and VS Code stays dark.
Run bun install and bun run dev from the repository root. The docs site consumes
public workspace source exports directly. Package-level check, build and prepack
remain available here; src/lib holds published sources and src/routes is only
a local library preview.
Packing includes this README and a generated copy of the repository MIT license. Edit the root license; generated package copies are ignored.
Shared types come directly from bref-ui/types and are re-exported as types from
bref-ui-themes. The root entry does not aggregate components or load theme CSS.
New Paris depends on Material Symbols and loads its variable fill font through Theme.
Black and ivory controls, serif typography and opaque paper overlays. All twenty components are exported through the theme subpath.
Material Symbols icons load automatically with Theme. The custom text font, Inter, is optional to avoid adding unused font assets to apps; text falls back to system fonts. To match the gallery typography, install and import Inter:
npm install @fontsource-variable/inter
<script> import '@fontsource-variable/inter/index.css'; import { Theme, Button } from 'bref-ui-themes/new-paris'; </script> <Theme><Button label="Save" /></Theme>
The gallery uses the same public package exports at /themes/new-paris.
Translucent controls and frosted overlays with scoped component styling. All twenty components are exported through the theme subpath:
<script> import { Theme, Button } from 'bref-ui-themes/glassy'; </script> <Theme><Button label="Save" /></Theme>
Material Symbols icons load automatically with Theme. Inter remains optional; to
match the gallery typography, install @fontsource-variable/inter and import
@fontsource-variable/inter/index.css in the app.
The gallery uses the same public package exports at /themes/glassy.
Light and dark frosted workbench controls with a complete component reference. All twenty components are exported through the theme subpath:
<script> import { Theme, Button } from 'bref-ui-themes/crystal-code'; </script> <Theme><Button label="Save" /></Theme>
Material Symbols icons load automatically with Theme. Inter remains optional; to match the gallery typography, install and import it:
npm install @fontsource-variable/inter
<script> import '@fontsource-variable/inter/index.css'; import { Theme, Button } from 'bref-ui-themes/crystal-code'; </script> <Theme><Button label="Save" icon={{ name: 'check' }} /></Theme>
The gallery uses the same public package exports at /themes/crystal-code.
Fixed-dark workbench controls with native interactions and scoped styling. All twenty components are exported through the theme subpath:
<script> import { Theme, Button } from 'bref-ui-themes/vscode'; </script> <Theme><Button label="Save" icon={{ name: 'check' }} /></Theme>
Material Symbols icons load automatically with Theme. Text uses system fonts, so no custom text font installation is required.
The gallery uses the same public package exports at /themes/vscode.
Join Discord and use the bref-ui channel for
questions and examples. Report bugs and suggest themes through
GitHub Issues.
This package lives in the Bref-ui monorepo. See CONTRIBUTING.md for contribution guidelines.
MIT.