question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add more documentation of each Components theme object

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
primos63commented, Nov 11, 2021

Yes, the question on ‘how do I theme a component’ comes up often. It is being addressed by the team. In the meantime, I have a CodeSandbox of theming examples from questions I’ve answered. It also has a How-To for Theming. Feel free to have a look.

1reaction
nikolovlazarcommented, Oct 31, 2022

Getting solved by #1100

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage - styled-components
This component provides a theme to all React components underneath itself via the context API. In the render tree all styled-components will have...
Read more >
How to use Themes in styled-components - DEV Community ‍ ‍
Theme provider uses context to provide the properties to its descendants. import React from "react"; import { ThemeProvider } from "styled- ...
Read more >
Components - Material UI - MUI
Components. You can customize a component's styles, default props, and more by using its keys inside the theme. This helps to achieve styling...
Read more >
Components - Theme UI
Theme UI components can be customized by adding styles to your theme. Each component accepts a variant prop to quickly change custom stylistic...
Read more >
Creating your themes - Docz
Another interesting thing that you can do when you're creating your own theme is to use the componentMap 's <Page> component to customize...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found