Stoop

GitHub
/createStoop

createStoop

#

Create a Stoop instance with theme configuration

Usage

#
import { createStoop } from "stoop";

const { styled, css, Provider, useTheme } = createStoop({
  theme: lightTheme,
  themes: {
    light: lightTheme,
    dark: darkTheme,
  },
});

Parameters

#
ParameterTypeDescription
themeThemeBase theme object with design tokens
themesRecord<string, Theme>Object mapping theme names to theme objects (optional, enables Provider and useTheme)
mediaRecord<string, string>Media query breakpoints for responsive styles (optional, can also be defined in theme)
utilsRecord<string, UtilityFunction>Custom utility functions (optional)
prefixstringPrefix for CSS class names and variables (default: "stoop")
themeMapRecord<string, ThemeScale>Custom theme scale mapping (optional)

Returns

#

Returns a StoopInstance object with:

Core Functions

#

SSR Functions

#

Theme Management (only if themes config provided)

#

Properties

#