Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/theme-utils

Package Overview
Dependencies
Maintainers
3
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/theme-utils

A Quick description of the component

  • 0.0.0-dev-20230213124817
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
454K
increased by5.7%
Maintainers
3
Weekly downloads
 
Created

What is @chakra-ui/theme-utils?

@chakra-ui/theme-utils is a utility package for managing and manipulating themes in Chakra UI. It provides a set of tools to help developers create, extend, and customize themes efficiently.

What are @chakra-ui/theme-utils's main functionalities?

createBreakpoints

The `createBreakpoints` function allows you to define custom breakpoints for responsive design. This is useful for setting up a consistent set of breakpoints across your application.

const { createBreakpoints } = require('@chakra-ui/theme-utils');

const breakpoints = createBreakpoints({
  sm: '30em',
  md: '48em',
  lg: '62em',
  xl: '80em'
});

console.log(breakpoints);

toCSSVar

The `toCSSVar` function converts a theme object into CSS variables. This is useful for applying theme values directly in CSS-in-JS solutions.

const { toCSSVar } = require('@chakra-ui/theme-utils');

const theme = {
  colors: {
    primary: '#ff0000',
    secondary: '#00ff00'
  }
};

const cssVars = toCSSVar(theme);

console.log(cssVars);

analyzeBreakpoints

The `analyzeBreakpoints` function provides an analysis of the breakpoints, such as the minimum and maximum values. This can be useful for debugging and ensuring your breakpoints are set up correctly.

const { analyzeBreakpoints } = require('@chakra-ui/theme-utils');

const breakpoints = ['30em', '48em', '62em', '80em'];

const analysis = analyzeBreakpoints(breakpoints);

console.log(analysis);

Other packages similar to @chakra-ui/theme-utils

Keywords

FAQs

Package last updated on 13 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc