Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@chakra-ui/core

chakra-ui35.9kMITdeprecated0.8.0TypeScript support: included

@chakra-ui/core is no longer supported! Please use @chakra-ui/react instead. See our migration docs (https://chakra-ui.com/docs/migration) for more information.

Responsive and accessible React UI components built with React and Emotion

react, ui, design-system, react-components, uikit, accessible, components, emotion, library

readme


chakra-ui symbol

Build Accessible React Apps with Speed ⚡️


All Contributors Bundle Size MIT License NPM Downloads Spectrum Spectrum Spectrum


Chakra UI provides a set of accessible, reusable and composable React components that make it super easy to create websites and apps.

Looking for the documentation?

Head over here => https://chakra-ui.com

Features

  • Ease of Styling: Chakra UI contains a set of layout components like Box and Stack that make it easy to style your components by passing props. Learn more
  • Flexible & composable: Chakra UI components are built on top of a React UI Primitive for endless composability.
  • Accessible. Chakra UI components follows the WAI-ARIA guidelines specifications and have the right aria-* attributes.
  • Dark Mode 😍: Most components in Chakra UI are dark mode compatible.

Support Chakra UI 💖

By donating $5 or more you can support the ongoing development of this project. We'll appreciate some support. Thank you to all our supporters! 🙏 [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Testimonials

People throw React component libraries and design systems at me regularly. This might be the best one I've seen. The APIs are simple but composable and the accessibility on the couple components I looked is complete.

Great work @thesegunadebayo, really inspiring work. – Ryan Florence

Awesome new open-source component library from @thesegunadebayo. Really impressive stuff! – Colm Tuite

This is incredible work. Amazing job Segun! – Lee Robinson

Chakra UI is glorious! I love the consistent use of focus styling and the subtle animation – Guillermo ▲

Installing Chakra UI

To use Chakra UI components, all you need to do is install the @chakra-ui/core package and its peer dependencies:

$ yarn add @chakra-ui/core @emotion/core @emotion/styled emotion-theming

# or

$ npm install @chakra-ui/core @emotion/core @emotion/styled emotion-theming

Usage

To start using the components, please follow these steps:

  1. Wrap your application with the ThemeProvider provided by @chakra-ui/core. We recommend that you also add the CSSReset component to remove all browser styling.
import { ThemeProvider, CSSReset } from "@chakra-ui/core".

// Do this at the root of your application
const App = ({ children }) => (
  <ThemeProvider>
    <CSSReset />
    {children}
  </ThemeProvider>
);

Optionally, you can wrap your application with the ColorModeProvider so you can toggle between light and dark mode within your app.

  1. Now you can start using components like so!:
import { Button } from "@chakra-ui/core";

<Button>I just consumed some ⚡️Chakra!</Button>;

CodeSandbox

Contributors

This project exists thanks to all the people who contribute. [Contribute].

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.8.0 (2020-05-16)

Bug Fixes

  • ts: add typing for content pseudobox property (e2fb824)
  • make component typings discoverable (898d4f3)

Features

  • add iconColor prop to <Select /> (968ca80)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.7.0 (2020-03-25)

Bug Fixes

  • image hook and key errors (5fa1895)
  • types: export use form-control and disclosure hook return (8598046)
  • add visibility prop to BoxProps (f3ec71d)
  • export skeleton not badge (bd02904)
  • import useTheme with relative import (81a844a)
  • key warning and export use-form-control (50ab37c)

Features

  • checkbox: add aria-labelledby attribute to input (d808fbe)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.6.1 (2020-02-26)

Bug Fixes

  • update editable and useclipboard hook (0fc4607)
  • update icon a11y (2148d5a)
  • popover: fix popover flickering when trigger is "hover" (a37c2a3)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.6.0 (2020-02-25)

Bug Fixes

Features

  • editable: cancel on blur (37f2cbe)
  • tagclosebutton: added isdisabled style and types to tagclosebutton (d8375a1)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.5.2 (2019-12-25)

Bug Fixes

  • resolve modal focus lock issue (1b2c4bb)
  • use UseNumberInputProps instead of useNumberInputProps (8ef820e)
  • types: update types for theme (57134eb)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.5.1 (2019-12-13)

Bug Fixes

  • export SimpleGrid component (ecdca25)
  • resolve types for variantColor (9a0030c)
  • numberinput: fix bugs and improve types for onChange and value (e3e3453)
  • types: change listitem types to use pseudobox props (615ebcc)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.5.0 (2019-12-03)

Bug Fixes

  • prevent bugs with multiple modals opened at the same time (46c5eaa)
  • prop name in Checkbox examples (5ff3c5a)
  • react-focus-lock issues and review storybook (af3816e)
  • resolve latest issues and fix types (db054a3)
  • set aria-checked to mixed when partially checked (42c8a1b)
  • types for switch component (ad22610)
  • useDisclosure types (3f72505)
  • number-input: cannot use numeric keypad (5cc4b37)
  • select: add onChange prop (1857fc6)
  • stack: convert React children to array before processing (3b7dce3), closes #234
  • stack: ensure that invalid elements are filtered correctly (04f9e7e)
  • types: omit conflicting types (830c93d)

Features

  • theme: apply fonts to Heading and Text (5f1d815)
  • add displayName to anonymous components (5587de9)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.4.0 (2019-10-14)

Bug Fixes

  • box: update type definitions (b78723a)
  • css: export css function (c8a17c8)
  • cssreset: remove comments from CSSReset preflight.js (25edb5b), closes #161
  • image: add prop to opt out of the fallbackSrc logic (cd1acc6)
  • image: add support for native width and height (e4b6165)
  • image: add support for native width and height (298f067)
  • improve NumberInput API (bca497e)
  • image: improve image hook (4fb5c04)
  • numberinput: improve NumberInput API (fe0441d)
  • numberinput: update API and docs for numberinput (dc70274)
  • numberinput: update story (bda8efc)
  • types: add types for default theme. closes issue #160 (dfef504)
  • types: add types for icons to improve DX (5629bc7)
  • types: update types to allow for migration to TS (73bbe73)

Features

  • add SimpleGrid component (ff5760c)
  • add SimpleGrid component and improve Stack (16cc9ef)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.3.4 (2019-10-09)

Bug Fixes

  • build: remove babel-runtime dep to fix modal issue (f4ae47f)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.3.3 (2019-10-09)

Bug Fixes

  • box: add overflow types from styled-system (805cb61)
  • box: update type definition for borderWidth props (f4310ec)
  • button: fix the types for leftIcon and rightIcon (9f3ba3a)
  • cssreset: update the type definition (d8f2701)
  • iconbutton: fix the types for the iconbutton (b9462d4)
  • modal: add support for preserving scrollbar gap (bd67ea0)
  • types: export named types in all components (7378b77)
  • resolve yarn v2 pnp issues (0e0a04f)
  • types: include named exports from theme in main type definitions (68e06d8)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.3.2 (2019-09-26)

Bug Fixes

  • alertdialog: update type definitions (da3c706)
  • drawer: update type definitions (290e82c)
  • input: resolve the error and focus border color props (45b0d97)
  • popover: update type definitions (3a221a3)
  • tooltip: fix the shouldwrapchildren issues. fixes issue #121 (5d90b77)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.3.1 (2019-09-25)

Bug Fixes

0.3.0-beta (2019-09-25)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.3.0 (2019-09-24)

Features