chakra-ui icon indicating copy to clipboard operation
chakra-ui copied to clipboard

input's border color on first render is black in nextjs

Open pedram6195 opened this issue 1 year ago • 3 comments

Description

I am using chakra's latest version inside a nextjs v14 app. I have some Inputs in my page with no extra styling. when I refresh the page the inputs border color is black on first render, then it turns to the default (gray.200). I've temporarily fixed it by styling every input by myself:

<Input borderColor='gray.200' />

Link to Reproduction

NA

Steps to reproduce

No response

Chakra UI Version

2.8.2

Browser

No response

Operating System

  • [ ] macOS
  • [X] Windows
  • [ ] Linux

Additional Information

No response

pedram6195 avatar Jan 06 '24 13:01 pedram6195

I have the same issue. Any solutions?

alessiosferro avatar Apr 16 '24 13:04 alessiosferro

"use client";

import { ChakraProvider, ColorModeScript } from "@chakra-ui/react";
import { theme } from "./theme/theme";

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <ChakraProvider theme={theme}>
      <ColorModeScript initialColorMode="light" />
      {children}
    </ChakraProvider>
  );
}

shrestha-prabin avatar Jul 07 '24 17:07 shrestha-prabin

@shrestha-prabin it worked, thanks ♥

pedram6195 avatar Jul 08 '24 05:07 pedram6195