You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@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


Version published
Weekly downloads
467K
increased by0.58%
Maintainers
3
Created
Weekly downloads
 

Package description

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

Readme

Source

@chakra-ui/theme-utils

A Quick description of the component

This is an internal utility, not intended for public usage.

Installation

yarn add @chakra-ui/theme-utils
# or
npm i @chakra-ui/theme-utils

Contribution

Yes please! See the contributing guidelines for details.

Licence

This project is licensed under the terms of the MIT license.

Keywords

FAQs

Package last updated on 17 Nov 2022

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc