View as Markdown

API reference: @salmonui/core/theme

ThemeProvidercomponent

import { ThemeProvider } from '@salmonui/core/theme';
function ThemeProvider({ theme, children, className, style, ref }: ThemeProviderProps): import("react").JSX.Element;

Theme scope root: <div class="salmon-theme-scope" data-salmon-theme="<hash>">. Renders no styles itself; the CSS comes from ThemeStyle or from the precompiled default stylesheet. No browser APIs during render. A theme that sets density also provides it to components with JavaScript metrics (the Data Grid row height); unset inherits the enclosing scope's.

Props: ThemeProviderProps

ThemeProvider props (5)
NameSignatureDescription
themeoptionaltheme?: SalmonThemeInput;
childrenoptionalchildren?: ReactNode;
classNameoptionalclassName?: string;
styleoptionalstyle?: CSSProperties;
refoptionalref?: Ref<HTMLDivElement>;