Made with ❤️ using TypeScript & Tailwind CSS.
NextuiQ is a fast, accessible, and fully customizable UI component library designed for Next.js and React. With built-in support for dark mode, accessibility, and semantic theming, NextuiQ helps you build modern UIs effortlessly.
Install NextUIQ using npm or yarn:
npm install nextuiq
# or
yarn add nextuiq
Add the following import to your global CSS file:
@import "nextuiq/style.css";
Example usage in a Next.js/React project:
import { Button } from "nextuiq";
const MyComponent = () => {
return <Button variant="primary">Click Me</Button>;
};
export default MyComponent;
NextUIQ supports light and dark themes out of the box. You can customize the theme using CSS variables:
Wrap your application with the ThemeProvider
:
import { ThemeProvider } from "nextuiq";
function App({ children }) {
return <ThemeProvider>{children}</ThemeProvider>;
}
NextUIQ uses OKLCH color format for better accessibility:
@theme {
--theme-primary: 0.546 0.245 262.881;
--theme-secondary: 0.541 0.281 293.009;
--theme-background: 1 0 0;
--theme-foreground: 0.208 0.042 265.755;
}
[data-theme="dark"] {
--theme-background: 0.129 0.042 264.695;
--theme-foreground: 0.984 0.003 247.858;
}
function MyComponent() {
const { theme, toggleTheme } = useTheme();
return (
<div className="bg-[oklch(var(--theme-muted))] p-4 rounded-lg">
<h1 className="text-[oklch(var(--theme-foreground))] text-xl font-semibold mb-4">
Current Theme: {theme}
</h1>
<Button
variant="primary"
onClick={toggleTheme}
className="flex items-center gap-2"
>
{theme === "dark" ? "🌞" : "🌙"} Switch to{" "}
{theme === "dark" ? "Light" : "Dark"} Mode
</Button>
</div>
);
}
Want to contribute? Follow these steps:
1️⃣ Clone the repository
git clone https://github.com/Mr-Bhardwa7/nextuiQ.git
cd nextuiQ
2️⃣ Install dependencies
npm install
3️⃣ Start the development server
npm run dev
4️⃣ Run Storybook for component testing
npm run storybook
MIT License © Animesh Bhardwaj
Join the NextuiQ community to get help, report issues, and contribute!
Find everything you need to get started and use NextuiQ effectively:
_We’d love to hear your feedback and ideas to make NextuiQ even better! 💡