View as Markdown

API reference: @salmonui/core/server

ThemeStylecomponent

import { ThemeStyle } from '@salmonui/core/server';
function ThemeStyle({ theme, nonce }: ThemeStyleProps): import("react").JSX.Element;

Server-safe theme stylesheet: no hooks, effects, or browser globals. Renders one React 19 hoistable <style> (data-href="salmonui-theme-<hash>"), which React deduplicates per document and hoists into <head>, on the server and on the client alike.

Props: ThemeStyleProps

ThemeStyle props (2)
NameSignatureDescription
themeoptionaltheme?: SalmonThemeInput;
nonceoptionalnonce?: string;

CSP nonce forwarded to the <style> element.