Theming

svelte-chop-chop uses CSS custom properties for theming. Import a built-in theme or override individual variables to match your brand.

Built-in themes

Import exactly one theme in your app entry point or layout:

// Default (dark blue-grey)
import '@we-are-singular/svelte-chop-chop/themes/default';

// Pure dark
import '@we-are-singular/svelte-chop-chop/themes/dark';

// Minimal (no chrome, white overlay)
import '@we-are-singular/svelte-chop-chop/themes/minimal';

CSS custom properties reference

Base

VariableDefaultDescription
--chop-bg#1a1a2eEditor background.
--chop-surface#16213eToolbar and panel surface.
--chop-borderrgba(255,255,255,0.08)Divider and border color.
--chop-radius8pxGeneral border radius.
--chop-fontsystem-ui, sans-serifFont family.

Typography

VariableDefaultDescription
--chop-textrgba(255,255,255,0.87)Primary text color.
--chop-text-mutedrgba(255,255,255,0.5)Secondary/muted text.
--chop-text-xs0.7remExtra-small font size (labels).

Stencil

VariableDefaultDescription
--chop-stencil-borderrgba(255,255,255,0.8)Stencil border color.
--chop-stencil-border-width1.5pxStencil border thickness.
--chop-overlay-bgrgba(0,0,0,0.55)Dark overlay outside stencil.
--chop-handle-size14pxDrag handle hit area.
--chop-handle-color#fffDrag handle visual color.
--chop-grid-colorrgba(255,255,255,0.3)Rule-of-thirds grid lines.

Toolbar & panels

VariableDefaultDescription
--chop-toolbar-height48pxTab bar height.
--chop-panel-height100pxPanel strip height.
--chop-accent#4a9effActive tab / accent color.
--chop-tab-colorrgba(255,255,255,0.5)Inactive tab color.
--chop-tab-active-color#4a9effActive tab color.

Slider

VariableDefaultDescription
--chop-slider-trackrgba(255,255,255,0.15)Slider track background.
--chop-slider-fill#4a9effSlider fill color.
--chop-slider-thumb#fffSlider thumb color.

Custom theme example

Override variables in your global CSS to create a custom theme:

/* my-theme.css */
:root {
  --chop-bg: #0d0d0d;
  --chop-surface: #1a1a1a;
  --chop-accent: #ff6b35;
  --chop-tab-active-color: #ff6b35;
  --chop-slider-fill: #ff6b35;
  --chop-handle-color: #ff6b35;
  --chop-stencil-border: rgba(255, 107, 53, 0.8);
}

Import it after the base theme:

import '@we-are-singular/svelte-chop-chop/themes/dark';
import './my-theme.css';