/Getting Started
Installation
How to install and set up HextaUI in your Next.js project.
Create a Next.js project
To create a new Next.js project, you can use the following command:
npx create-next-app@latest my-nextjs-app
pnpm dlx create-next-app@latest my-nextjs-app
yarn dlx create-next-app@latest my-nextjs-app
bun x create-next-app@latest my-nextjs-app
Replace my-nextjs-app
with your desired project name.
Install HextaUI
To install HextaUI in your Next.js project, navigate to your project directory and run:
npm install hextaui@latest
pnpm add hextaui@latest
yarn add hextaui@latest
bun add hextaui@latest
Initialize HextaUI
Run the init
command to initialize HextaUI in your project:
npx hextaui@latest init
pnpm dlx hextaui@latest init
yarn dlx hextaui@latest init
bun x hextaui@latest init
Add components
You can now start using HextaUI components in your Next.js project.
npx hextaui@latest add button
pnpm dlx hextaui@latest add button
yarn dlx hextaui@latest add button
bun x hextaui@latest add button
This command will add Button
component to your project. You can simply import the button component from components/ui
in your project.
import { Button } from "components/ui/button";
export default function Home() {
return (
<main>
<h1>Welcome to HextaUI with Next.js!</h1>
<Button>Click Me</Button>
</main>
);
}
Edit on GitHub
Last updated on