Giter VIP home page Giter VIP logo

chakra-ui-docs's Introduction

⚠️ Attention

This repository has been moved to Chakra UI Repository Please refer to the new repository for the latest changes.


Chakra logo

Build Accessible React Apps with Speed ⚡️


Bundle Size Language grade: JavaScript MIT License NPM Downloads Github Stars Discord


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

This is the Chakra UI documentation repo

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.

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 ▲

Contributing

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

Contributors ✨

Thanks goes to these wonderful people

Segun Adebayo
Segun Adebayo

💻 🚧 📖 💡 🎨
Tioluwani Kolawole
Tioluwani Kolawole

📖 💡 🚧
Adrian Aleixandre
Adrian Aleixandre

💻 📖
Lee
Lee

📖
Kristóf Poduszló
Kristóf Poduszló

💻 🤔 🐛 📖
Mark Chandler
Mark Chandler

💻 ⚠️ 📖 🚧
Christian Nwamba
Christian Nwamba

📖
Jonathan Bakebwa
Jonathan Bakebwa

📖 🤔
Temitope Ajiboye
Temitope Ajiboye

📖
jess
jess

📖 🔍
Trevor Blades
Trevor Blades

💻 📖 🐛
Santi Albo
Santi Albo

💻 📖
Sebastian Trebunak
Sebastian Trebunak

💻 📖
Jason Miazga
Jason Miazga

💻 📖
Tony Narlock
Tony Narlock

💻 📖
Makenna Smutz
Makenna Smutz

💻 📖 🤔
Mohamed Nainar
Mohamed Nainar

📖
Mustafa Turhan
Mustafa Turhan

📖
Kim Røen
Kim Røen

📖
Jeremy Lu
Jeremy Lu

📖 💻
Ivan Dalmet
Ivan Dalmet

📖 💻 🔌
Brody McKee
Brody McKee

📖
Patrick Cason
Patrick Cason

📖
balibebas
balibebas

📖
Navin Moorthy
Navin Moorthy

💻 📖
Tim Kindberg
Tim Kindberg

📖
iodar
iodar

📖
MAO YUFENG
MAO YUFENG

📖
Peng Jie
Peng Jie

💻 📖
Anton
Anton

📖
Damnjan Lukovic
Damnjan Lukovic

📖
Ben Mitchinson
Ben Mitchinson

📖
Simo Aleksandrov
Simo Aleksandrov

📖
CodinCat
CodinCat

📖
Kerem Sevencan
Kerem Sevencan

📖
harveyhalwin
harveyhalwin

📖
Mansour benyoucef
Mansour benyoucef

📖
Andrew Garrison
Andrew Garrison

📖
Carlos Rodrigues
Carlos Rodrigues

📖
Dwight Watson
Dwight Watson

📖
ChasinHues
ChasinHues

📖
Pablo Rocha
Pablo Rocha

📖
Juliano Farias
Juliano Farias

📖
Sivert Schou Olsen
Sivert Schou Olsen

📖
Andrei Lazarescu
Andrei Lazarescu

📖
Adriano Resende
Adriano Resende

📖
Victor Bastos
Victor Bastos

📖
Vincent
Vincent

📖
Candice
Candice

🎨 🐛 📖
Dave Bauman
Dave Bauman

📖
TimKolberger
TimKolberger

🐛 📖 💻
iskanderbroere
iskanderbroere

📖
Pavel 'Strajk' Dolecek
Pavel 'Strajk' Dolecek

📖
Keshav Bohra
Keshav Bohra

📖
okezieuc
okezieuc

📖
Clayton Faria
Clayton Faria

📖
Andrew Ellis
Andrew Ellis

💻 🐛 📖
Ifeoma Imoh
Ifeoma Imoh

📖
Spencer Duball
Spencer Duball

📖
Jacob Arriola
Jacob Arriola

📖
Kenley Jean
Kenley Jean

📖
Umar Gora
Umar Gora

📖
Hong Suk Woo
Hong Suk Woo

📖
Junho Yeo
Junho Yeo

📖
Samuel Kauffmann
Samuel Kauffmann

📖
yuichiro miyamae
yuichiro miyamae

📖
songheewon
songheewon

📖
Prasanna Venkatesh T S
Prasanna Venkatesh T S

📖
anthowm
anthowm

📖
Danan Wijaya
Danan Wijaya

📖
Shubham Kaushal
Shubham Kaushal

📖
Petter Sæther Moen
Petter Sæther Moen

📖
Herman Nygaard
Herman Nygaard

📖
jnmsl
jnmsl

📖
Sam Poder
Sam Poder

📖
Dominic Lee
Dominic Lee

📖 💻
JP Ungaretti
JP Ungaretti

📖
Endika Intxaurtieta
Endika Intxaurtieta

📖
Anant Jain
Anant Jain

📖
Tom Chen
Tom Chen

📖 🚇
Ernie Miranda
Ernie Miranda

📖
bjoluc
bjoluc

📖
Sujit Pradhan
Sujit Pradhan

📖 💻
Abhishek Kashyap
Abhishek Kashyap

📖
imalbert
imalbert

📖
Hasib Hassan
Hasib Hassan

📖
Jamie Rolfs
Jamie Rolfs

🤔 📖 💻
Surabhi Gupta
Surabhi Gupta

📖
Wade McDaniel
Wade McDaniel

📖
Amilkar Munoz
Amilkar Munoz

📖
João Paulo Rodrigues
João Paulo Rodrigues

📖
Avery Freeman
Avery Freeman

📖
Daniel Schulz
Daniel Schulz

🐛 💻 📖 🤔
Lazar Nikolov
Lazar Nikolov

📖 💡 🚧
Tucker Massad
Tucker Massad

📖
hamasu
hamasu

📖
Remi W.
Remi W.

📖
Folasade Agbaje
Folasade Agbaje

📖
Johann Ehlers
Johann Ehlers

📖
YenTing Wu
YenTing Wu

📖
Soham Shah
Soham Shah

📖
wattanx
wattanx

📖
Rodrigo Maia
Rodrigo Maia

📖
Aravind Ramalingam
Aravind Ramalingam

📖
Mustafa Haddara
Mustafa Haddara

📖
Bryan Guillen
Bryan Guillen

📖 🐛
Axel Navarro
Axel Navarro

📖
Andrej
Andrej

📖
Giacomo Rebonato
Giacomo Rebonato

📖
Ashal Farhan
Ashal Farhan

💻
Bartek Czyż
Bartek Czyż

🐛
Imad Atyat-Alah
Imad Atyat-Alah

📖
Anish De
Anish De

💻
Emmanuel DEMEY
Emmanuel DEMEY

📖
Noriyuki Shinpuku
Noriyuki Shinpuku

📖
StuartReeve
StuartReeve

📖
Satya Achanta
Satya Achanta

🐛
Ben
Ben

📖
Rodrigo Fuentes
Rodrigo Fuentes

🐛
Daniel Yuschick
Daniel Yuschick

📖
Brent Bovenzi
Brent Bovenzi

📖
Jake Boone
Jake Boone

📖
Patrick Ullrich
Patrick Ullrich

📖
aboveyunhai
aboveyunhai

📖
Nathan H. Leung
Nathan H. Leung

📖
Danilo Woznica
Danilo Woznica

🐛
aaarichter
aaarichter

🐛
Max F.
Max F.

📖
Curdin Krummenacher
Curdin Krummenacher

📖
Tyler Pfledderer
Tyler Pfledderer

📖
Matthew O'Loughlin
Matthew O'Loughlin

📖
Jacob Marshall
Jacob Marshall

📖
Aroyan
Aroyan

🐛
Lucas Mesquita
Lucas Mesquita

📖
Stephane Ruhlmann
Stephane Ruhlmann

📖
AijiUejima
AijiUejima

📖
Angie Merryweather
Angie Merryweather

🐛
Reza
Reza

📖
Yuki Takemoto
Yuki Takemoto

🐛
Samuli Asmala
Samuli Asmala

💻
Lucas Ferronato
Lucas Ferronato

📖
Kolby Sisk
Kolby Sisk

🐛
Rahul SriRam
Rahul SriRam

📖
Aashutosh Rathi
Aashutosh Rathi

🐛
sitogi
sitogi

🐛
Leption
Leption

📖
Heather Warnke
Heather Warnke

📖
Hari Vishnu Parashar
Hari Vishnu Parashar

📖
Kelvin Welter
Kelvin Welter

📖
PyBash
PyBash

📖
Umar Abid
Umar Abid

📖
Isaac
Isaac

📖
Jake Giganti
Jake Giganti

📖
K Kudose
K Kudose

📖

(emoji key):

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

Testing supported by

BrowserStack

License

MIT © Segun Adebayo

chakra-ui-docs's People

Contributors

aacevski avatar allcontributors[bot] avatar bryanguillen avatar cereallarceny avatar codebender828 avatar cschroeter avatar dependabot-preview[bot] avatar dependabot[bot] avatar dodas avatar estheragbaje avatar github-actions[bot] avatar gkosheev avatar jmiazga avatar lekoarts avatar ljosberinn avatar m4x3d avatar monuelo avatar navin-moorthy avatar nikolovlazar avatar noobinthisgame avatar segunadebayo avatar takethefake avatar timkolberger avatar tioluwani94 avatar tisks avatar tomchentw avatar tylerapfledderer avatar wattanx avatar with-heart avatar yentingwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chakra-ui-docs's Issues

update changelog CI actions

Subject

Get the docs changelog to be in sync with main repo

Description

  • Move the Changelog into the pages directory
  • Update the CI on the main repo to open a PR to this repo each time the .changeset folder gets updated.
    Here's the process I have in mind, merge the "Version Packages" PR in the main repo >>> merge the "Update Changelog" PR in this repo
  • Move the discord script from the main repo here as well. When we merge the "Update changelog" PR, we'll create a CI action to post an update to our Twitter and Discord channel

Add more documentation of each Components theme object

Subject

All Components

Description

Whenever you want to style a component, you most likely end up going to the View theme source button of each component. This often then leads you to the @chakra-ui/anatomy folder, to investigate all parts. The View theme source has been a welcome addition a while back, but I don't think it's the most user friendly, especially for new comers.

I am wondering if we could create a more user friendly documentation around the theme file.

Taking Input component as an example, we could add another section at the end of the documentation (https://chakra-ui.com/docs/form/input)

Theme

List of parts: field, addon
<insert some graphic pointing out which part is which?>

I am not sure how far one has to go, but potentially more information about inheritance as well? E.g. textarea takes from input by default, or the relationship between button and Icon button.

Would love to gage the interest in this, and more than willing to take a crack at it.

Switch component does not apply an `isInvalid` style

Description

When the isInvalid prop is applied to the Switch component. I would expect some visual representation of this.

Link to Reproduction

https://codesandbox.io/s/chakra-switch-isinvalid-efj7b?file=/src/index.tsx

Steps to reproduce

  1. Go to index.tsx
  2. See that the component with isInvalid has no styling applied

Chakra UI Version

1.6.12

Browser

Google Chrome 95

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

The docs state that it updates the state of the unchecked state. Not sure if the component or the documentation needs to change.

(bug): Website sidebar scrolls to some other position after selection.

Bug report

Describe the bug

Sidebar scrolls to some other position after clicking on different list group item. But it does not scroll if same group item is selected.

To reproduce

  1. Scroll sidebar down to very bottom.
  2. Click on 'useBreakpointValue'.
  3. Click on 'Avatar'.
  4. Sidebar will scroll to some another position.

Expected behavior

Selected sidebar list item should not scroll to some other position. Item should stay below mouse cursor.

Screenshots

ezgif com-resize

System information

  • OS: macOS
  • Browser (if applies): Safari 13.1.1

(i18n): Request to add Japanese Documentation

Subject

Request to add Japanese Documentation

Description

First of all, thank you chakra-ui community for this awesome library!

I've just started usnig chakra and I think its wonderful!
But, It's hard for some Japanese developers to read English documentation.
Therefore, I would like to add Japanese documentation.

I can help with the Japanese translation if need be.

Thank you.

BreadCrumbs: React does not recognize the isLastChild prop on a DOM element.

Description

When Using the BreadCrumb component I get warnings in my console about the isLastChild prop

Link to Reproduction

https://codesandbox.io/s/chakra-ui-breadcrumbseperator-bug-zrw8w

Steps to reproduce

  1. Go to sandbox
  2. Open Console
  3. See Error

Chakra UI Version

1.7.3

Browser

Google Chrome 95

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

It seems like only BreadCrumbItems are allowed in the BreadCrumb element. I added a Breadcrumb seperator to match the design I got. I also wondered why the BreadCrumbSeperator is exported if these kind of things don't work.

(Same issue as: chakra-ui/chakra-ui#3543, but with reproduction)

Color Mode Feature - Add ColorModeScript Next.js of TypeScript version

Subject

Color Mode

Description

In chakra-ui source code has the ColorModeScript of Next.js in TypeScript version.

The docs don't have, which cause confusion because theme.ts already had .js and .ts version + People are using TypeScript more and more nowadays.

export default class Document extends NextDocument {
  static getInitialProps(ctx: DocumentContext) {
    return NextDocument.getInitialProps(ctx)
  }

  render() {
    return (
      <Html>
        <Head />
        <body>
          <ColorModeScript />
          <Main />
          <NextScript />
        </body>
      </Html>
    )
  }
}

Refactor get-showcase-data.ts script to run faster

Description

Currently the get-showcase-data.ts script runs for more than 6 hours, so GitHub automatically stops it and the action is marked as failed. Let's refactor the script, so it only generates images for the new links that appeared in the Awesome repo, and remove the ones we have locally in showcase.json but don't exist in the Awesome repo.

Idea:

  • Scrape the awesome-chakra-ui repo and get the links
  • Read the local showcase.json
  • Find the new links (exists in awesome-chakra-ui repo but don't in showcase.json)
  • Remove the deleted ones (exists in showcase.json but don't in awesome-chakra-ui repo)
  • Generate images only for the new ones
  • Save everything in showcase.json

Bad Core Web Vitals

Description

I decided to run a lighthouse test on the Chakra UI website yesterday and I was surprised to see the scores come in quite low (in fact the performance is in the red territory)

Screenshot -
image

Observation 1: Use of Chakra Img (docs say that it should be used with SSR pages) and chakra.img
Fix: Replace with Next Image ( #137 )

Observation 2: Bad contrast ratio on light mode
image
image
Fix: I don't know. Chakra UI team needs to change colors to improve the contrast ratio.

Observation 3: Well, something lighthouse is complaining about, I don't understand it. I hope someone can explain this to me and there is a fix for this
image

Observation 4: SEO issues -
image
Awaiting response from the team on this

I have created a pr ( #137 ) for the first observation. I am not sure about the best way to approach the other ones and hence I would like to have advice from the team.

Create a FAQ page

Description

Create a FAQ page where we can answer the most commonly asked questions on Discord, Twitter or GitHub.

Problem Statement/Justification

There are new developers getting started with Chakra UI every day. Most of them ask the same questions on Discord/Twitter/GitHub, and wait for someone to answer them. Having a FAQ page will help the newcomers progress easier and faster.

Proposed Solution or API

Similarly to how the Resources page works, we can create pages/faq.tsx which will read the Q&As from configs/faq.json.

See pages/resources.tsx to see how it's implemented.

(feature): Update the resources page

Update the resources page with new apps/websites that have been posted in the #🌟-showcase channel on Discord.

Context:

  • The resources page is pages/resources.tsx
  • The data lives in configs/resources.json
  • There are 3 types: talks, videos, and blogs. These are not set in stone. We can also enlist examples as well.

Bonus: add a link to the Design vs Dev repo in the examples category.

Import section on component docs section is getting obscured on first load

Description

When I went directly to any component documentation page, the first code block ie import section got obscured as shown in screenshot but it dissapeared after navigation to and fro within the site

Link to Reproduction

https://chakra-ui.com/docs/disclosure/tabs

Steps to reproduce

  1. Go to https://chakra-ui.com/docs/disclosure/tabs
  2. Scroll down to import section
  3. See error
  4. Navigate to any other tab and when back it appears correctly
  5. Repeat

Chakra UI Version

1.6.12

Browser

Google Chrome 95.0.4638.69 (Official Build) (64-bit)

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

image

(docs): create a hooks page for the Checkbox hooks

In the Checkbox documentation there is a section about hooks. This one only mentions useCheckbox and useCheckboxGroup but does not give any information on how they should be used or an example.

Here is a link to the section: https://chakra-ui.com/docs/form/checkbox#hooks

They should include the return values, parameters, and at least one usage case as an example.

Moderator note: we should create a new page for the checkbox hooks in the "Hooks" section, but reference it in the Checkbox component page.

Add prettier

Description

Add a proper prettier config / setup to the docs project to ensure code styles are enforced.

Problem Statement/Justification

As of now there is not prettier config and not prettier linting in the project. Thus code styles are not enforced.

Proposed Solution or API

We can take the same prettier config as the main project.

Alternatives

No response

Additional Information

No response

(docs): `SliderMark` not mentioned in the doc, and `SliderThumb` with tooltip

Hello,

The SliderMark tag is not mentioned in the online documentation. Here is an example.

That said, I find it's easier to set a tooltip to the SliderThumb.

  const [sliderValue, setSliderValue] = React.useState(5);
  <Slider id="slider" defaultValue={5} min={0} max={10} colorScheme="blue" onChange=(v) => {setSliderValue(v)}>
    <SliderTrack>
      <SliderFilledTrack />
    </SliderTrack>
    <Tooltip hasArrow bg="red.600" placement="top" closeOnClick={false} isOpen label={sliderValue}>
      <SliderThumb />
    </Tooltip>
  </Slider>

Type errors in custom Tabs example

🐛 Bug report

The docs for creating custom Tab components have type errors. Specifically, themeKey is not a key in StyledOptions.

Argument of type '{ themeKey: string; }' is not assignable to parameter of type 'StyledOptions'.
  Object literal may only specify known properties, and 'themeKey' does not exist in type 'StyledOptions'.

💥 Steps to reproduce

Copy the custom Tabs example into a TS project and observe TS error.

💻 Link to reproduction

https://codesandbox.io/s/custom-tabs-bug-erqe1?file=/src/CustomTabs.tsx

🧐 Expected behavior

No type errors.

🧭 Possible Solution

  • Fix type definition of StyledOptions.
  • Update docs example if required.

Menu - Remove MenuIcon, MenuCommand from import as it is only used inside chakra-ui source code

Subject

Remove MenuIcon, MenuCommand from import

Description

Currently, MenuIcon and MenuCommand are being shown in docs page without description or examples, which can cause confusion about how to use them.

image

image

Moreover, I inspect chakra-ui source code and saw them only used as composition component to implement icon and command props of MenuItem, MenuItemOption component.

image
MenuItem component

image

(docs): Getting started with Remix

Subject

Getting Started

Description

Now that Remix is open sourced I think it would make sense to create a section to get started started with Remix and Chakra UI.

(feature): Refactor the Resources page

Subject

Resources

Description

Refactor the Resources page.

  • Isolate the Talks, Videos and Blogs into their own tabs.
  • Add a search filtering functionality inside the tabs.
  • ⭐️ Bonus challenge: Utilize a masonry grid to display the resources.

checklist

  • Add script to update .all-membersrc
  • Add script to update .all-sponsorsrc
  • Update .all-contributorsrc to include only those who contributed to docs
  • Add .github actions and workflows related to docs
  • Add Vercel Github app

Publish with source maps 🗺️

Description

Hey!

I just took a look at the docs for the Tab List and noticed that source maps were off by default which made it hard to see how the demos were running in the page.

Here's a quick replay of what it looks like now. It's still possible to see what's going on, but it'd be much nicer if we had the original code to look at as well.

Happy to help if this is interesting!

Color of headline

Subject

Homepage

Description

On the homepage, the “with speed” headline is currently in black but should be in teal colour.

Correct navigation of component pages

Subject

Navigation

Description

There should be a correct Navigation from Radio > Range Slider and not Radio > Select, Slider > Switch and not Slider > Range Slider

Simplify Github Issue Template

Subject

Issue Template

Description

There's a lot of form elements people need to fill when creating a bug report.

  • So, we need to simplify that Github issue template and reduce the number of fields.
  • Remove feature request template. It feels a bit redundant since we're not managing code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.