Chakra UI

为您的 React 应用程序提供简单、模块化和可访问的 UI 组件。「⚡️Simple, Modular & Accessible UI Components for your React Applications」

Github星跟踪图

Chakra UI is a comprehensive library of accessible, reusable, and composable
React components that streamlines the development of modern web applications and
websites. The library offers a diverse range of components that can be easily
combined to build complex user interfaces while adhering to accessibility best
practices.

Table of contents

Documentation

It's the https://chakra-ui.com website for the latest version of Chakra UI. For
older versions head over here

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 follow the WAI-ARIA guidelines specifications
    and have the right aria-* attributes.
  • Dark Mode 😍: Most components in Chakra UI are dark mode compatible.

Installation

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

# with Yarn
$ yarn add @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6

# with npm
$ npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6

# with pnpm
$ pnpm add @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6

# with Bun
$ bun add @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6

Usage

To start using the components, please follow these steps:

  1. Wrap your application with the ChakraProvider provided by
    @chakra-ui/react.
import { ChakraProvider } from "@chakra-ui/react"

// Do this at the root of your application
function App({ children }) {
  return <ChakraProvider>{children}</ChakraProvider>
}

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/react"

function Example() {
  return <Button>I just consumed some ⚡️Chakra!</Button>
}

More guides on how to get started are available
here

CodeSandbox Templates

create-react-app Templates

Check out our guide for
information on how to use our official create-react-app templates.

Contributing

Feel like contributing? That's awesome! We have a
contributing guide to help guide you.

Our docsite lives in a
separate repo. If you're
interested in contributing to the documentation, check out the
docsite contribution guide.

Support Chakra UI

Organizations

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










Individuals

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]

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 ▲

Awards and Mentions

We've been extremely humbled to receive awards and mentions from the community
for all the innovation and reach Chakra UI brings to the JavaScript ecosystem.

Contributors

Thanks goes to these wonderful people

(emoji key):

This project follows the
all-contributors
specification. Contributions of any kind welcome!

Testing supported by

License

MIT © Segun Adebayo

概览

名称与所有者chakra-ui/chakra-ui
主编程语言MDX
编程语言JavaScript (语言数: 5)
平台Linux, Mac, Windows
许可证MIT License
发布数4238
最新版本名称@chakra-ui/tooltip@2.3.1 (发布于 2023-11-09 15:45:17)
第一版名称@chakra-ui/core@0.1.2 (发布于 2019-08-09 20:23:07)
创建于2019-08-17 14:27:54
推送于2024-04-26 14:01:32
最后一次提交
星数36.6k
关注者数206
派生数3.1k
提交数9.1k
已启用问题?
问题数3565
打开的问题数259
拉请求数2265
打开的拉请求数68
关闭的拉请求数824
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?
去到顶部