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.

Change focusBorderColor globaly

See original GitHub issue

A clear and concise description of what the problem is. Ex. I’m always frustrated when […] I’ve seen here i can customize input borders with the focusBorderColor.   https://github.com/chakra-ui/chakra-ui/blob/24b9df8b73c45735579f4a9e5a16e71b3703f432/packages/chakra-ui-docs/pages/input.mdx

Is there a place in theme.js that i should use to change these for every input instance instead of having to pass that param for each one?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

25reactions
tomaszgilcommented, Jan 10, 2021

Stumbled upon this issue as well - I wanted to tweak focus color for inputs. Using defaultProps worked for me well here.

const Input = {
  baseStyle: {
    field: {
      background: 'pink',
      color: 'gray.700',
    },
  },
  defaultProps: {
    focusBorderColor: 'brand.700',
  },
}

With that there’s not need to create custom wrapper components. Hope it helps.

15reactions
sohhammcommented, May 2, 2021

Please allow us to override global _focus property

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change focus border color - Material Design for Bootstrap
Expected behavior I want to be able to change the color of the input:focus globally. Actual behavior It's not possible to change the...
Read more >
outline-color - CSS: Cascading Style Sheets - MDN Web Docs
Custom focus styles commonly involve making adjustments to the outline property. If the color of the outline is adjusted, it is important to ......
Read more >
Chakra UI for React: change _focus borderColor not work
To change the focus border color, you have to access the focusBorderColor selector,. This can either be set in the variant you want...
Read more >
outline-color | CSS-Tricks
An outline is a line that is drawn around elements — outside the border edge — that is used for accessibility or decoration...
Read more >
How to Change MUI TextField's Border Color (Hover, Focus ...
How to Change MUI TextField's Border Color (Hover, Focus, Overrides, and More) · 1 Material-UI Input Border Color · 2 Change MUI TextField...
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