JSPM

@theme-ui/color-modes

1.0.0--canary.1721.d10fcf34ecc89f0898c55c6669ea69896e9f0b5d.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31550
  • Score
    100M100P100Q150094F
  • License MIT

Package Exports

  • @theme-ui/color-modes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@theme-ui/color-modes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@theme-ui/color-modes

Adds support for user-controlled color modes

https://theme-ui.com

Note: This package is included in the main theme-ui package, and generally should not be used on its own.

npm i @theme-ui/color-modes
import { ThemeProvider } from '@theme-ui/core'
import { ColorModeProvider } from '@theme-ui/color-modes'
import theme from './theme'

export default (props) => (
  <ThemeProvider theme={theme}>
    <ColorModeProvider>{props.children}</ColorModeProvider>
  </ThemeProvider>
)

API

  • useColorMode
  • ColorModeProvider
  • InitializeColorMode