764 questions
0
votes
0
answers
59
views
Chakra UI v3 className="dark" not overriding color mode
The Chakra UI docs, https://chakra-ui.com/docs/styling/dark-mode, state the following:
To force dark mode, set the dark className on any parent element, or the root element of your application.
<...
0
votes
0
answers
61
views
Chakra UI modular theme imports break base styles after bundle optimization
I’m trying to optimize bundle size by importing only the Chakra UI components I use (Box, Card, Flex, Icon, Heading, SimpleGrid, GridItem, Stack, VStack, HStack, Text, Button, Link, Container) and ...
0
votes
1
answer
99
views
how can I create custom Gradient colors in chakra ui v3
I am using this approach
<Box bgImage="gradients.gradientBluePurple_toR_600" w="64" h="64" />
Here’s my current theme setup:
// src/theme/foundations/theme.ts
...
3
votes
1
answer
66
views
Chakra UI Card and CardBody won't render in React App
My apologies if this question has been asked, but I can't find the issue I'm having.
I'm using React Vite and Chakra-UI. Everything works fine, until I use Card.
This works fine (Item and Flex also ...
2
votes
0
answers
37
views
PinInput ChakraUI v3 - Component React gap cannot change
I'm using Chakra UI v3's PinInput component and need to eliminate the gaps between individual input fields. I've tried several approaches but none seem to work:
What I've tried:
gap={0}
sx={{
'...
0
votes
0
answers
24
views
Vercel deployment fails due to typecheck for Chakra-UI custom recipe variant
The problem I am running into is that the local typecheck is OK, but the Vercel deployment typecheck is failing:
"@chakra-ui/react": "^3.25.0",
"@emotion/react": "^...
0
votes
0
answers
70
views
Strange behaviour of NumberInput and Select component in ChakraUI
I am facing a strange situation with ChakraUI components. I am trying to use ChakraUI's NumberInput component and Select component.
Scenario 1:
If the NumberInput component is written before the ...
0
votes
1
answer
67
views
how to change background color of react/chakra switch?
I am newbie in react/chakra ui. I need to do some basic stuff: change background color of switch component (thumb part? when is checked). Was trying to do it in several ways, but none is working.
...
1
vote
1
answer
56
views
How can I change the color of the bullet (marker) in a Chakra UI <ListItem>
I’m using Chakra UI’s List and ListItem components to render a simple bulleted list:
import { List, ListItem } from "@chakra-ui/react";
function MyList() {
return (
<List gap={3}>...
0
votes
0
answers
22
views
Chakra UI: Is there a way to do theming with data from a database? #10112
I am looking to set up custom themes for different customers in the same app. I am using extendTheme for the base theme at the moment, but the recommended usage is to create its own file where that ...
2
votes
4
answers
441
views
chakra-ui overwrites TailwindCSS utilities/classes
So the prop value={defaultSystem} in the ChakraProvider it overwrite the styles from the TailwindCSS classes even in normal tags not a Chakra component.
Example**
<ChakraProvider value={...
0
votes
0
answers
81
views
Chakra3 ui Select slot recipe - indicator color change on trigger state change (focused, hovered, expanded)
i am trying to compose my own chakra 3 ui slot recipe based on the reference slot recipe provided by chakra.
Currently i am trying to achieve the behavior whereby the indicator aka the down chervon ...
1
vote
1
answer
119
views
Tooltip not showing next to Chakra UI v3 container
So the main problem is that Chakra UI v3 tooltip component is not displayed near the wraped box, but in the upper left corner of the entire page. More likely problem is in positioning, but I can't ...
1
vote
0
answers
83
views
Chakra UI Styles Break When Injected via Chrome Extension Using Shadow DOM
I'm currently developing a Chrome extension built with React 19, TypeScript, Vite 6.2, and Chakra UI 3.9.0. The extension UI is injected directly into web pages using a content script, not a popup. To ...
-1
votes
1
answer
261
views
How do I make toast notification with a custom placement?
According to the documentation for Chakra UI Toast
We are supposed to be able to control the default location toasts appear using the following snippet
const toaster = createToaster({
placement: &...
0
votes
0
answers
51
views
Chakra UI shared theme in Nx – styles breaking in UI library components
I'm working on a monorepo using Nx with Chakra UI. I’ve set up a shared library to hold my custom theme, and I’m importing it into my apps and component libraries.
Here’s the setup:
I have a shared ...
0
votes
0
answers
136
views
chakra-ui v3 doesn't render gray background with vite and react with a recipe and token system
I am following this tutorial:
Build and Deploy an Instagram Clone with React and Firebase – Tutorial.
package.json:
{
"name": "insta-clone",
"private": true,
"...
0
votes
2
answers
131
views
Why is my button text overflowing outside my grid?
I am working through a React tutorial and this section is heaving with Chakra UI. The tutorial is based in a v2 version of Chakra and I just installed the latest and adjusted according based on the ...
1
vote
1
answer
265
views
Chakra UI: `colorScheme` not working in latest version (v3.16.1)?
I just created a new React project using Vite and installed the latest version of Chakra UI (@chakra-ui/[email protected]). I previously used Chakra UI in older projects where the colorScheme prop was ...
-1
votes
1
answer
75
views
Alpha Mask on image using Chakra UI to create an opacity gradient [duplicate]
I want to create a simple opacity gradient on an image. I'm using Next.JS with Chakra UI and Tailwind CSS for the front-end design, and I cannot find a way to do it.
This is a result that I did on ...
0
votes
1
answer
267
views
React v19 with Vite v6 and ChakraUI show error "Failed to resolve import "@chakra-ui/react""
I created my empty react app with Vite v.6 and install Chakra UI. But after starting the application, I see an error:
"Internal server error: Failed to resolve import "@chakra-ui/react"...
0
votes
0
answers
138
views
Chakra UI v3 styles not applied in Next.js 15 with --turbopack
I'm using Next.js 15 with Chakra UI v3 and running the app with the --turbopack. However, the Chakra UI styles don't seem to be applied correctly.
For example, in the code below I'm using Chakra UI's ...
0
votes
0
answers
68
views
Chakra-ui/react Tauri Vite - Cannot initialise app after build (uncaught type error extendStatics is not a function)
Had this issue for a while where I can build to completion but initialisation leads to the following error:
react-BqWMAaNf.js:1228 Uncaught TypeError: extendStatics is not a function
at __extends ...
2
votes
2
answers
549
views
Chakra UI v.3 Custom Theme Not Applying in React App
I'm trying to change the focus outline color and set custom fonts using a custom Chakra UI theme in my React app, but neither the focus outline color nor the fonts are being applied as expected. ...
1
vote
0
answers
52
views
input losing focus when results in Chakra `Menu` appears
I have an input that shows search results below it. When it's searching, I show a loading indicator inside the Input component. however, when I type many letters, as the search updates, the input ...
0
votes
0
answers
46
views
Chakra-UI Toast, printing Toast: {count}
I have implemented Chakra-UI toast successfully. I have noticed everytime my toast notification is active, text is displayed on the component 'toast: {count}'. This is in my dev environment.
Is this ...
1
vote
2
answers
911
views
Uncaught TypeError: Cannot read properties of undefined (reading '_config') while using Chakra UI
I am facing an issue while trying to use Chakra UI in my React application. The following error occurs when I attempt to run the app. I am using the latest version of React and Chakra UI.
The error ...
1
vote
3
answers
769
views
How to fix a Chakra import file not found error in Vite
I am following this tutorial - https://www.youtube.com/watch?v=O3BUHwfHf84 (MERN Stack Tutorial with Deployment - Beginners Course). @59.15 we are up to developing the front end using Chakra, Vite and ...
1
vote
1
answer
175
views
nx build fails after installing Chakra UI on GitHub Actions but succeeds locally
I have a pretty fresh Nx/Next install with CI set up with GitHub Actions. I added a simple page to set up testing with Cypress and Jest, and the nx build succeeded as I'd suspect after pushing to ...
2
votes
2
answers
1k
views
Missing equivalent for FormLabel in Chakra UI v3
I've been migrating my projects from Chakra UI v2 to v3, following the Migration to v3 guide, but I'm unsure how to handle certain components that don't seem to have a direct equivalent in v3.
For ...
0
votes
1
answer
92
views
chakra-ui v3, missing vars (tokens) nextjs
I'm using Chakra v3.7.0
There are variables missing, for example:
zIndex, borderWidths etc. Even I tried to define the tokens. It doesn't work.
export const tokens = defineTokens({
borderWidths: {
...
0
votes
1
answer
1k
views
How to customize background colors for dark & light mode in Chakra UI v3?
I'm using Chakra UI v3 + React for my UI and want to customize the background colors for both dark and light modes. I explored the Chakra UI docs and found information on tokens, semantic tokens, and ...
0
votes
2
answers
214
views
ChakraUI custom theme w recipe, not shown in component from snippet
I am trying to update the theme, with some custom colors for components. IE: I want my default buttons to be a specific shade of blue. So i followed the docs and added semantic tokens such as:
...
-1
votes
1
answer
202
views
How to implement tab and function of its on Next.js using Chakra UI
everyone!
I'd like to add powerful Tab on my Next.js app using Chakra UI.
when I click main category, sub catergory will be show, animation is to right in and left out smoothly.
content will be also ...
0
votes
2
answers
804
views
ForwardRef error when using Icon in react +chakra u
My goal is to get this code (or some variation of it) to work in the latest version of Chakra UI. The app.tsx react file below runs but gives me a forwardRef() warning
import { HStack, Icon } from &...
0
votes
1
answer
66
views
Rotate parent container without affecting child image [duplicate]
I am trying to create a similar design to this image in HTML/CSS:
The main focus here are the angled images. My goal is to have a row of images that are divided by a separator that can be straight or ...
0
votes
1
answer
572
views
How to use custom fonts at Chakra v3
Started using Chakra v3 and can't figure out why my fonts aren't applying to the app, colors are working fine. What is best approach using fonts from files at public folder with chakra v3?
export ...
0
votes
0
answers
44
views
Adding MUI icon to ChakraUI project
I have a chakraUI project which is using chakra2, and I want to use MUI icons. I don't need MUI for anything except the icons
When I add an icon to the page I get the following errors:
I have ...
0
votes
0
answers
15
views
use Chakra colorPalette to style non-chakra elements
I've set colorPalette at the root of my project:
createRoot(document.getElementById("root")!).render(
<StrictMode>
<Provider>
<Theme colorPalette="...
1
vote
0
answers
83
views
Getting error "Type error: 'ChakraSelect.Context' cannot be used as a JSX component." when build nextjs 14 with chakra Ui v3 #9458
I encountered an issue while trying to run pnpm run build (which is equivalent to next build) to create a production build.
The Select component is installed by chakra v3 snippet.
The error is shown ...
0
votes
0
answers
101
views
dispatcher.useInsertionEffect error with react-pdf/renderer and Chakra UI
I want to download a Chakra UI component with @react-pdf/renderer
Copying some code from react-pdf's documentation, I have this:
import "./App.css";
import Header from "./components/...
0
votes
0
answers
19
views
Use chakra embossed a form, after submit, the form is Inoperable
1.the login.js: Open the pop-up window and set the content according to the submitted response result.
useEffect(() => {
if (response) {
onOpen(response.type, response.message);
if(...
0
votes
0
answers
215
views
How to solve react hydration error in Nextjs with Chakra UI
I am learning to use Nextjs with Chakra UI in building website. However, when I am about to finish, there is this error:
I assume is has something to do with the dark mode? I have been modifying the ...
0
votes
2
answers
144
views
In Chakra UI or CSS how to get ribbon-like fold on the right-hand side of the button
I have been able create the above part but I want to create the as shown in the bottom part of the image highlighted by the red circle. I have to use Chakra UI 2.10.4 in React
my code:
<Box bg={...
1
vote
1
answer
89
views
On hover split a css white dot in two halves diagonally split
So this is the task I am trying to complete, as you can see in the image there is a white dot next to words "Perspective"
beforeAfter
On hover it splits into halve diagonally.
It has been ...
0
votes
0
answers
51
views
Screen goes blank after chakra-ui modal code added
I have a navbar which has a button to open modal, which is a component. I added the chakra-ui code as seen in docs and after that the whole screen disappears when i remove the code the app appears ...
0
votes
1
answer
247
views
Chakra UI: Help on scrollable tab content needed
In Chakra UI version 2, I have the following Tabs component whose content overflows instead of being scrollable:
function App() {
return (
<ChakraProvider>
<Box
width={300}...
4
votes
5
answers
4k
views
chakra-ui v3 doesn't work with vite and react
I am following this tutorial:
Build and Deploy an Instagram Clone with React and Firebase – Tutorial
Which uses the package.json:
{
"name": "vite-project",
"private": ...
0
votes
2
answers
53
views
React Error: Element type is invalid when rendering a list of results from API
I’m trying to fetch city data using the OpenCage API and display the results in a list using React and Chakra UI. However, I'm getting the following error: Error: Element type is invalid: expected a ...
0
votes
1
answer
61
views
I got an error when providing the above='md' prop to <Show>
import { Grid, GridItem, Show } from "@chakra-ui/react"
function App() {
return <Grid templateAreas={
{
base: `"nav" "main"`,
md: `"nav nav&...