View as Markdown

API reference: @salmonui/core/theme

SalmonThemeInputinterface

import type { SalmonThemeInput } from '@salmonui/core/theme';

Also exported from @salmonui/core/server.

interface SalmonThemeInput {
    colors?: {
        primary?: SalmonHexColor;
        success?: SalmonHexColor;
        warning?: SalmonHexColor;
        danger?: SalmonHexColor;
        info?: SalmonHexColor;
    };
    colorScheme?: SalmonColorScheme | 'inherit';
    density?: SalmonDensity;
    fontFamily?: string;
    neutral?: {
        hue?: number;
        chroma?: number;
    };
    surfaces?: {
        sidebar?: SalmonSurfaceColor;
        appBar?: SalmonSurfaceColor;
        tableHeader?: SalmonSurfaceColor;
    };
}
SalmonThemeInput members (6)
NameSignatureDescription
colorsoptionalcolors?: { primary?: SalmonHexColor; success?: SalmonHexColor; warning?: SalmonHexColor; danger?: SalmonHexColor; info?: SalmonHexColor; };
colorSchemeoptionalcolorScheme?: SalmonColorScheme | 'inherit';

inherit follows a data-salmon-color-scheme attribute set by the host on an ancestor.

densityoptionaldensity?: SalmonDensity;

Control and row metrics. Unset: inherited from the enclosing scope ('default' at the root).

fontFamilyoptionalfontFamily?: string;

CSS font-family list for --salmon-font-sans. Unset: inherited (the system stack at the root).

neutraloptionalneutral?: { hue?: number; chroma?: number; };

Tint of the neutral ramp: OKLCH hue in degrees (default: the primary hue) and chroma (clamped to [0, 0.04]).

surfacesoptionalsurfaces?: { sidebar?: SalmonSurfaceColor; appBar?: SalmonSurfaceColor; tableHeader?: SalmonSurfaceColor; };

Region surfaces ([data-salmon-surface]). Unset: inherited from the enclosing scope.