UNPKG

3.39 kBMarkdownView Raw
1# Welcome to Chakra UI ⚡️
2
3[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
4
5- Works out of the box. Chakra UI contains a set of polished React components
6 that work out of the box.
7
8- Flexible & composable. Chakra UI components are built on top of a React UI
9 Primitive for endless composability.
10
11- Accessible. Chakra UI components follows the WAI-ARIA guidelines
12 specifications.
13
14- Dark Mode 😍: All components are dark mode compatible.
15
16## Looking for the documentation?
17
18https://chakra-ui.com
19
20## Installing Chakra UI
21
22⚡️Chakra UI is made up of multiple components and tools which you can import
23one by one. All you need to do is install the `@chakra-ui/core` package:
24
25```sh
26$ yarn add @chakra-ui/core
27# or
28$ npm install --save @chakra-ui/core
29```
30
31# Getting set up
32
33To start using the components, please follow these steps:
34
351. Wrap your application in a `ThemeProvider` provided by **@chakra-ui/core**
36
37```jsx
38import { ThemeProvider, ColorModeProvider } from "@chakra-ui/core";
39
40const App = ({ children }) => (
41 <ThemeProvider>
42 <ColorModeProvider>{children}</ColorModeProvider>
43 </ThemeProvider>
44);
45```
46
47`ColorModeProvider` is a context that provides light mode and dark mode values
48to the components. It also comes with a function to toggle between light/dark
49mode.
50
512. Now you can start using components like so!:
52
53```jsx
54import { Button } from "@chakra-ui/core";
55
56const App = () => <Button>I just consumed some ⚡️Chakra!</Button>;
57```
58
59# Contributing
60
61Feel like contributing? That's awesome! We have a
62[contributing guide](../../CONTRIBUTING.md) to help guide you.
63
64The components to be built come from the
65[Aria Practices Design Patterns and Widgets](https://www.w3.org/TR/wai-aria-practices-1.1).
66
67## Contributors ✨
68
69Thanks goes to these wonderful people
70([emoji key](https://allcontributors.org/docs/en/emoji-key)):
71
72<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
73<!-- prettier-ignore-start -->
74<!-- markdownlint-disable -->
75<table>
76 <tr>
77 <td align="center"><a href="https://github.com/segunadebayo"><img src="https://avatars2.githubusercontent.com/u/6916170?v=4" width="100px;" alt="Segun Adebayo"/><br /><sub><b>Segun Adebayo</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui/commits?author=segunadebayo" title="Code">💻</a> <a href="#maintenance-segunadebayo" title="Maintenance">🚧</a> <a href="https://github.com/chakra-ui/chakra-ui/commits?author=segunadebayo" title="Documentation">📖</a> <a href="#example-segunadebayo" title="Examples">💡</a> <a href="#design-segunadebayo" title="Design">🎨</a></td>
78 <td align="center"><a href="https://github.com/tioluwani94"><img src="https://avatars1.githubusercontent.com/u/11310046?v=4" width="100px;" alt="Tioluwani Kolawole"/><br /><sub><b>Tioluwani Kolawole</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui/commits?author=tioluwani94" title="Documentation">📖</a> <a href="#example-tioluwani94" title="Examples">💡</a> <a href="#maintenance-tioluwani94" title="Maintenance">🚧</a></td>
79 </tr>
80</table>
81
82<!-- markdownlint-enable -->
83<!-- prettier-ignore-end -->
84
85<!-- ALL-CONTRIBUTORS-LIST:END -->
86
87This project follows the
88[all-contributors](https://github.com/all-contributors/all-contributors)
89specification. Contributions of any kind welcome!