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

@chakra-ui/provider

Package Overview
Dependencies
Maintainers
2
Versions
606
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/provider

Theme and components agnostic ChakraProvider

  • 2.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
478K
decreased by-1.66%
Maintainers
2
Weekly downloads
 
Created
Source

@chakra-ui/provider

Standalone React provider for Chakra-based custom component libraries.

Warning

This package is provided for building custom component libraries, and does not include any default theme or configurations. If you are not sure why you are using it, please use @chakra-ui/react instead;

Installation

yarn add @chakra-ui/provider

# or

npm i @chakra-ui/provider

Usage

As the default theme and config is not included, you will need a theme object following the system-ui specification, augmented with the following configuration properties.

More details on ChakraProvider's available props can be found here

import * as React from "react"

// 1. import `ChakraProvider` component
import { ChakraProvider } from "@chakra-ui/provider"

// 2. build your theme and config
const theme = {
  // ... your system-ui theme
  config: {
    useSystemColorMode: false, // or true
    initialColorMode: "light", // or "dark"
    cssVarPrefix: "chakra", // any string
  }
}

// 3. Use at the root of your app
function App({ Component }) {
  return (
    <ChakraProvider theme={theme}>
      <Component />
    </ChakraProvider>
  )
}

Keywords

FAQs

Package last updated on 09 Nov 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