Default Button theme missing pointer cursor
- [x] I have searched the Issues to see if this bug has already been reported
- [x] I have tested the latest version
I just finished a major update on a project that’s been running for about two years. I upgraded Tailwind CSS from v3 to v4 and Flowbite React from v0.7 to v0.12.14, and I’m still cleaning up a few minor warnings.
I noticed that the Button component no longer uses cursor-pointer by default. As a result, hundreds of buttons in my project now require the cursor-pointer class to be added manually.
I tested this in a fresh project generated from the official Flowbite GitHub template, with just a single button rendered on the page, and the cursor still didn’t change to a pointer on hover.
What’s confusing is that all the button examples in the Flowbite React documentation show a pointer cursor on hover, but the default button theme (shown at the bottom of the page) doesn’t include cursor-pointer.
Would it make sense to include cursor-pointer in the default button styles so the actual behavior matches the documentation?
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
- [ ] Create Plan
🔗 Similar Issues
Possible Duplicates
- https://github.com/themesberg/flowbite-react/issues/1565
Related Issues
- https://github.com/themesberg/flowbite-react/issues/1570
- https://github.com/themesberg/flowbite-react/issues/1563
- https://github.com/themesberg/flowbite-react/issues/1537
- https://github.com/themesberg/flowbite-react/issues/1507
🔗 Related PRs
themesberg/flowbite-svelte#1366 - fix: use negative margin to correct uneven border [merged] themesberg/flowbite-vue#336 - feat: add support for using tooltips on buttons that are inside a but… [merged] themesberg/flowbite-svelte#1572 - fix: Button default cursor not set after Tailwind 4.0.0 [merged] themesberg/flowbite-svelte#1815 - Popper tweaking never ends [merged] themesberg/flowbite-vue#416 - fix/issue 414/button link height mismatch [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord or schedule a call!
I solved this issue by adding below line to my index.css [role=button],button { cursor: pointer; } By the way, I'm using:
"@tailwindcss/vite": "^4.1.18",
"flowbite": "^4.0.1",
"flowbite-react": "^0.12.14",
"tailwindcss": "^4.1.18",
"vite": "^7.2.4",
I'll go through each point mentioned above:
- Tailwind CSS v4 came with a few changes, one of them is the cursor pointer button default style, read more here: https://tailwindcss.com/docs/upgrade-guide#buttons-use-the-default-cursor
- https://flowbite-react.com/ docs are still on Tailwind CSS v3, which has
cursor: pointerby default - the
flowbite-reactCLI (read more here https://flowbite-react.com/docs/getting-started/cli) has almost all starter templates based off Tailwind CSS v4, therefore buttons will behave like v4 defaults, exactly like u mentioned - the official and recommended fix for ur problem is the following snippet:
@layer base {
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
}
- u can also leverage the powerful theming engine (read more here https://flowbite-react.com/docs/customize/theme) to customize on a global and granular level all the component's styles
using the theme prop with createTheme helper (fully typed):
import { Button, createTheme, ThemeProvider } from "flowbite-react";
const customTheme = createTheme({
button: {
base: "not-disabled:cursor-pointer",
},
});
function App() {
return (
<ThemeProvider theme={customTheme}>
<Button>I am visually clickable</Button>
<Button>I am also visually clickable</Button>
</ThemeProvider>
);
}
using the theme prop inline:
import { Button, ThemeProvider } from "flowbite-react";
function App() {
return (
<ThemeProvider
theme={{
button: {
base: "not-disabled:cursor-pointer",
},
}}
>
<Button>I am visually clickable</Button>
<Button>I am also visually clickable</Button>
</ThemeProvider>
);
}
or by using the props prop:
import { Button, ThemeProvider } from "flowbite-react";
function App() {
return (
<ThemeProvider
props={{
button: {
className: "not-disabled:cursor-pointer",
},
}}
>
<Button>I am visually clickable</Button>
<Button>I am also visually clickable</Button>
</ThemeProvider>
);
}