umd-styles-library
    Preparing search index...

    Function tokens

    • Adds JSS tokens to the browser as CSS variables Uses the fromTokens function for token processing

      Parameters

      • tokens: Record<string, any>

        JavaScript object containing design tokens

      • options: {
            formatKey?: (key: string, kebabCase: boolean) => string;
            important?: boolean;
            kebabCase?: boolean;
            prefix?: string;
            target?: HTMLElement;
        } = {}

        Configuration options

      Returns {
          apply: (obj: Record<string, any>, currentPrefix?: string) => void;
          getAppliedVariables: () => string[];
          remove: () => void;
          update: (newTokens: Record<string, any>, basePrefix?: string) => void;
      }

      Object containing apply, update, and remove methods

      1.3.0