Skip to content

Commit 2323cc9

Browse files
authoredJan 16, 2025
Merge pull request #16 from frontio-ai/feat/heroui
feat: heroui
2 parents ec9e706 + caef70c commit 2323cc9

File tree

10 files changed

+90
-118
lines changed

10 files changed

+90
-118
lines changed
 

‎README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Next.js & NextUI Template
1+
# Next.js & HeroUI Template
22

3-
This is a template for creating applications using Next.js 14 (pages directory) and NextUI (v2).
3+
This is a template for creating applications using Next.js 14 (pages directory) and HeroUI (v2).
44

5-
[Try it on CodeSandbox](https://githubbox.com/nextui-org/next-pages-template)
5+
[Try it on CodeSandbox](https://githubbox.com/frontio-ai/next-pages-template)
66

7-
>Note: Since Next.js 14, the pages router is recommend migrating to the [new App Router](https://nextjs.org/docs/app) to leverage React's latest features
7+
> Note: Since Next.js 14, the pages router is recommend migrating to the [new App Router](https://nextjs.org/docs/app) to leverage React's latest features
88
>
9-
>Read more: [Pages Router](https://nextjs.org/docs/pages)
9+
> Read more: [Pages Router](https://nextjs.org/docs/pages)
1010
1111
## Technologies Used
1212

1313
- [Next.js 14](https://nextjs.org/docs/getting-started)
14-
- [NextUI](https://nextui.org)
14+
- [HeroUI](https://heroui.com)
1515
- [Tailwind CSS](https://tailwindcss.com)
1616
- [Tailwind Variants](https://tailwind-variants.org)
1717
- [TypeScript](https://www.typescriptlang.org)
@@ -23,7 +23,7 @@ This is a template for creating applications using Next.js 14 (pages directory)
2323
To create a new project based on this template using `create-next-app`, run the following command:
2424

2525
```bash
26-
npx create-next-app -e https://github.com/nextui-org/next-pages-template
26+
npx create-next-app -e https://github.com/frontio-ai/next-pages-template
2727
```
2828

2929
### Install dependencies
@@ -45,11 +45,11 @@ npm run dev
4545
If you are using `pnpm`, you need to add the following code to your `.npmrc` file:
4646

4747
```bash
48-
public-hoist-pattern[]=*@nextui-org/*
48+
public-hoist-pattern[]=*@heroui/*
4949
```
5050

5151
After modifying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
5252

5353
## License
5454

55-
Licensed under the [MIT license](https://github.com/nextui-org/next-pages-template/blob/main/LICENSE).
55+
Licensed under the [MIT license](https://github.com/frontio-ai/next-pages-template/blob/main/LICENSE).

‎components/icons.tsx

-28
Original file line numberDiff line numberDiff line change
@@ -184,31 +184,3 @@ export const SearchIcon = (props: IconSvgProps) => (
184184
/>
185185
</svg>
186186
);
187-
188-
export const NextUILogo: React.FC<IconSvgProps> = (props) => {
189-
const { width, height = 40 } = props;
190-
191-
return (
192-
<svg
193-
fill="none"
194-
height={height}
195-
viewBox="0 0 161 32"
196-
width={width}
197-
xmlns="http://www.w3.org/2000/svg"
198-
{...props}
199-
>
200-
<path
201-
className="fill-black dark:fill-white"
202-
d="M55.6827 5V26.6275H53.7794L41.1235 8.51665H40.9563V26.6275H39V5H40.89L53.5911 23.1323H53.7555V5H55.6827ZM67.4831 26.9663C66.1109 27.0019 64.7581 26.6329 63.5903 25.9044C62.4852 25.185 61.6054 24.1633 61.0537 22.9582C60.4354 21.5961 60.1298 20.1106 60.1598 18.6126C60.132 17.1113 60.4375 15.6228 61.0537 14.2563C61.5954 13.0511 62.4525 12.0179 63.5326 11.268C64.6166 10.5379 65.8958 10.16 67.1986 10.1852C68.0611 10.1837 68.9162 10.3468 69.7187 10.666C70.5398 10.9946 71.2829 11.4948 71.8992 12.1337C72.5764 12.8435 73.0985 13.6889 73.4318 14.6152C73.8311 15.7483 74.0226 16.9455 73.9968 18.1479V19.0773H63.2262V17.4194H72.0935C72.1083 16.4456 71.8952 15.4821 71.4714 14.6072C71.083 13.803 70.4874 13.1191 69.7472 12.6272C68.9887 12.1348 68.1022 11.8812 67.2006 11.8987C66.2411 11.8807 65.3005 12.1689 64.5128 12.7223C63.7332 13.2783 63.1083 14.0275 62.6984 14.8978C62.2582 15.8199 62.0314 16.831 62.0352 17.8546V18.8476C62.009 20.0078 62.2354 21.1595 62.6984 22.2217C63.1005 23.1349 63.7564 23.9108 64.5864 24.4554C65.4554 24.9973 66.4621 25.2717 67.4831 25.2448C68.1676 25.2588 68.848 25.1368 69.4859 24.8859C70.0301 24.6666 70.5242 24.3376 70.9382 23.919C71.3183 23.5345 71.6217 23.0799 71.8322 22.5799L73.5995 23.1604C73.3388 23.8697 72.9304 24.5143 72.4019 25.0506C71.8132 25.6529 71.1086 26.1269 70.3314 26.4434C69.4258 26.8068 68.4575 26.9846 67.4831 26.9663V26.9663ZM78.8233 10.4075L82.9655 17.325L87.1076 10.4075H89.2683L84.1008 18.5175L89.2683 26.6275H87.103L82.9608 19.9317L78.8193 26.6275H76.6647L81.7711 18.5169L76.6647 10.4062L78.8233 10.4075ZM99.5142 10.4075V12.0447H91.8413V10.4075H99.5142ZM94.2427 6.52397H96.1148V22.3931C96.086 22.9446 96.2051 23.4938 96.4597 23.9827C96.6652 24.344 96.9805 24.629 97.3589 24.7955C97.7328 24.9548 98.1349 25.0357 98.5407 25.0332C98.7508 25.0359 98.9607 25.02 99.168 24.9857C99.3422 24.954 99.4956 24.9205 99.6283 24.8853L100.026 26.5853C99.8062 26.6672 99.5805 26.7327 99.3511 26.7815C99.0274 26.847 98.6977 26.8771 98.3676 26.8712C97.6854 26.871 97.0119 26.7156 96.3973 26.4166C95.7683 26.1156 95.2317 25.6485 94.8442 25.0647C94.4214 24.4018 94.2097 23.6242 94.2374 22.8363L94.2427 6.52397ZM118.398 5H120.354V19.3204C120.376 20.7052 120.022 22.0697 119.328 23.2649C118.644 24.4235 117.658 25.3698 116.477 26.0001C115.168 26.6879 113.708 27.0311 112.232 26.9978C110.759 27.029 109.302 26.6835 107.996 25.9934C106.815 25.362 105.827 24.4161 105.141 23.2582C104.447 22.0651 104.092 20.7022 104.115 19.319V5H106.08V19.1831C106.061 20.2559 106.324 21.3147 106.843 22.2511C107.349 23.1459 108.094 23.8795 108.992 24.3683C109.993 24.9011 111.111 25.1664 112.242 25.139C113.373 25.1656 114.493 24.9003 115.495 24.3683C116.395 23.8815 117.14 23.1475 117.644 22.2511C118.16 21.3136 118.421 20.2553 118.402 19.1831L118.398 5ZM128 5V26.6275H126.041V5H128Z"
203-
/>
204-
<path
205-
className="fill-black dark:fill-white"
206-
d="M23.5294 0H8.47059C3.79241 0 0 3.79241 0 8.47059V23.5294C0 28.2076 3.79241 32 8.47059 32H23.5294C28.2076 32 32 28.2076 32 23.5294V8.47059C32 3.79241 28.2076 0 23.5294 0Z"
207-
/>
208-
<path
209-
className="fill-white dark:fill-black"
210-
d="M17.5667 9.21729H18.8111V18.2403C18.8255 19.1128 18.6 19.9726 18.159 20.7256C17.7241 21.4555 17.0968 22.0518 16.3458 22.4491C15.5717 22.8683 14.6722 23.0779 13.6473 23.0779C12.627 23.0779 11.7286 22.8672 10.9521 22.4457C10.2007 22.0478 9.5727 21.4518 9.13602 20.7223C8.6948 19.9705 8.4692 19.1118 8.48396 18.2403V9.21729H9.72854V18.1538C9.71656 18.8298 9.88417 19.4968 10.2143 20.0868C10.5362 20.6506 11.0099 21.1129 11.5814 21.421C12.1689 21.7448 12.8576 21.9067 13.6475 21.9067C14.4374 21.9067 15.1272 21.7448 15.7169 21.421C16.2895 21.1142 16.7635 20.6516 17.0844 20.0868C17.4124 19.4961 17.5788 18.8293 17.5667 18.1538V9.21729ZM23.6753 9.21729V22.845H22.4309V9.21729H23.6753Z"
211-
/>
212-
</svg>
213-
);
214-
};

‎components/navbar.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import {
2-
Navbar as NextUINavbar,
2+
Navbar as HeroUINavbar,
33
NavbarContent,
44
NavbarMenu,
55
NavbarMenuToggle,
66
NavbarBrand,
77
NavbarItem,
88
NavbarMenuItem,
9-
} from "@nextui-org/navbar";
10-
import { Button } from "@nextui-org/button";
11-
import { Kbd } from "@nextui-org/kbd";
12-
import { Link } from "@nextui-org/link";
13-
import { Input } from "@nextui-org/input";
14-
import { link as linkStyles } from "@nextui-org/theme";
9+
} from "@heroui/navbar";
10+
import { Button } from "@heroui/button";
11+
import { Kbd } from "@heroui/kbd";
12+
import { Link } from "@heroui/link";
13+
import { Input } from "@heroui/input";
14+
import { link as linkStyles } from "@heroui/theme";
1515
import NextLink from "next/link";
1616
import clsx from "clsx";
1717

@@ -49,7 +49,7 @@ export const Navbar = () => {
4949
);
5050

5151
return (
52-
<NextUINavbar maxWidth="xl" position="sticky">
52+
<HeroUINavbar maxWidth="xl" position="sticky">
5353
<NavbarContent className="basis-1/5 sm:basis-full" justify="start">
5454
<NavbarBrand className="gap-3 max-w-fit">
5555
<NextLink className="flex justify-start items-center gap-1" href="/">
@@ -63,7 +63,7 @@ export const Navbar = () => {
6363
<NextLink
6464
className={clsx(
6565
linkStyles({ color: "foreground" }),
66-
"data-[active=true]:text-primary data-[active=true]:font-medium",
66+
"data-[active=true]:text-primary data-[active=true]:font-medium"
6767
)}
6868
color="foreground"
6969
href={item.href}
@@ -136,6 +136,6 @@ export const Navbar = () => {
136136
))}
137137
</div>
138138
</NavbarMenu>
139-
</NextUINavbar>
139+
</HeroUINavbar>
140140
);
141141
};

‎components/theme-switch.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, useState, useEffect } from "react";
22
import { VisuallyHidden } from "@react-aria/visually-hidden";
3-
import { SwitchProps, useSwitch } from "@nextui-org/switch";
3+
import { SwitchProps, useSwitch } from "@heroui/switch";
44
import { useTheme } from "next-themes";
55
import clsx from "clsx";
66

‎config/site.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type SiteConfig = typeof siteConfig;
22

33
export const siteConfig = {
4-
name: "Next.js + NextUI",
4+
name: "Next.js + HeroUI",
55
description: "Make beautiful websites regardless of your design experience.",
66
navItems: [
77
{
@@ -60,9 +60,9 @@ export const siteConfig = {
6060
},
6161
],
6262
links: {
63-
github: "https://github.com/nextui-org/nextui",
64-
twitter: "https://twitter.com/getnextui",
65-
docs: "https://nextui.org",
63+
github: "https://github.com/frontio-ai/heroui",
64+
twitter: "https://twitter.com/hero_ui",
65+
docs: "https://heroui.com",
6666
discord: "https://discord.gg/9b6yyZKmH4",
6767
sponsor: "https://patreon.com/jrgarciadev",
6868
},

‎layouts/default.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Link } from "@nextui-org/link";
1+
import { Link } from "@heroui/link";
22

33
import { Head } from "./head";
44

@@ -20,11 +20,11 @@ export default function DefaultLayout({
2020
<Link
2121
isExternal
2222
className="flex items-center gap-1 text-current"
23-
href="https://nextui-docs-v2.vercel.app?utm_source=next-pages-template"
24-
title="nextui.org homepage"
23+
href="https://www.heroui.com"
24+
title="heroui.com homepage"
2525
>
2626
<span className="text-default-600">Powered by</span>
27-
<p className="text-primary">NextUI</p>
27+
<p className="text-primary">HeroUI</p>
2828
</Link>
2929
</footer>
3030
</div>

‎package.json

+52-52
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
{
2-
"name": "next-pages-template",
3-
"version": "0.1.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next dev --turbo",
7-
"build": "next build",
8-
"start": "next start",
9-
"lint": "eslint . --ext .ts,.tsx -c .eslintrc.json --fix"
10-
},
11-
"dependencies": {
12-
"@nextui-org/button": "2.2.8",
13-
"@nextui-org/code": "2.2.5",
14-
"@nextui-org/input": "2.4.7",
15-
"@nextui-org/kbd": "2.2.5",
16-
"@nextui-org/link": "2.2.6",
17-
"@nextui-org/listbox": "2.3.8",
18-
"@nextui-org/navbar": "2.2.7",
19-
"@nextui-org/snippet": "2.2.9",
20-
"@nextui-org/switch": "2.2.7",
21-
"@nextui-org/system": "2.4.5",
22-
"@nextui-org/theme": "2.4.4",
23-
"@react-aria/visually-hidden": "3.8.18",
24-
"clsx": "2.1.1",
25-
"framer-motion": "11.13.1",
26-
"intl-messageformat": "^10.5.0",
27-
"next": "15.0.4",
28-
"next-themes": "^0.4.4",
29-
"react": "18.3.1",
30-
"react-dom": "18.3.1"
31-
},
32-
"devDependencies": {
33-
"@types/node": "20.5.7",
34-
"@types/react": "18.3.3",
35-
"@types/react-dom": "18.3.0",
36-
"@typescript-eslint/eslint-plugin": "8.11.0",
37-
"@typescript-eslint/parser": "8.11.0",
38-
"autoprefixer": "10.4.19",
39-
"eslint": "^8.57.0",
40-
"eslint-config-prettier": "9.1.0",
41-
"eslint-plugin-import": "^2.26.0",
42-
"eslint-plugin-jsx-a11y": "^6.4.1",
43-
"eslint-plugin-node": "^11.1.0",
44-
"eslint-plugin-prettier": "5.2.1",
45-
"eslint-plugin-react": "^7.23.2",
46-
"eslint-plugin-react-hooks": "^4.6.0",
47-
"eslint-plugin-unused-imports": "4.1.4",
48-
"postcss": "8.4.49",
49-
"tailwind-variants": "0.1.20",
50-
"tailwindcss": "3.4.16",
51-
"typescript": "5.6.3",
52-
"prettier": "3.3.3"
53-
}
2+
"name": "next-pages-template",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --turbo",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "eslint . --ext .ts,.tsx -c .eslintrc.json --fix"
10+
},
11+
"dependencies": {
12+
"@heroui/button": "2.2.9",
13+
"@heroui/code": "2.2.6",
14+
"@heroui/input": "2.4.8",
15+
"@heroui/kbd": "2.2.6",
16+
"@heroui/link": "2.2.7",
17+
"@heroui/listbox": "2.3.9",
18+
"@heroui/navbar": "2.2.8",
19+
"@heroui/snippet": "2.2.10",
20+
"@heroui/switch": "2.2.8",
21+
"@heroui/system": "2.4.6",
22+
"@heroui/theme": "2.4.5",
23+
"@react-aria/visually-hidden": "3.8.18",
24+
"clsx": "2.1.1",
25+
"framer-motion": "11.13.1",
26+
"intl-messageformat": "^10.5.0",
27+
"next": "15.0.4",
28+
"next-themes": "^0.4.4",
29+
"react": "18.3.1",
30+
"react-dom": "18.3.1"
31+
},
32+
"devDependencies": {
33+
"@types/node": "20.5.7",
34+
"@types/react": "18.3.3",
35+
"@types/react-dom": "18.3.0",
36+
"@typescript-eslint/eslint-plugin": "8.11.0",
37+
"@typescript-eslint/parser": "8.11.0",
38+
"autoprefixer": "10.4.19",
39+
"eslint": "^8.57.0",
40+
"eslint-config-prettier": "9.1.0",
41+
"eslint-plugin-import": "^2.26.0",
42+
"eslint-plugin-jsx-a11y": "^6.4.1",
43+
"eslint-plugin-node": "^11.1.0",
44+
"eslint-plugin-prettier": "5.2.1",
45+
"eslint-plugin-react": "^7.23.2",
46+
"eslint-plugin-react-hooks": "^4.6.0",
47+
"eslint-plugin-unused-imports": "4.1.4",
48+
"postcss": "8.4.49",
49+
"tailwind-variants": "0.1.20",
50+
"tailwindcss": "3.4.16",
51+
"typescript": "5.6.3",
52+
"prettier": "3.3.3"
53+
}
5454
}

‎pages/_app.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { AppProps } from "next/app";
22

3-
import { NextUIProvider } from "@nextui-org/system";
3+
import { HeroUIProvider } from "@heroui/system";
44
import { ThemeProvider as NextThemesProvider } from "next-themes";
55
import { useRouter } from "next/router";
66

@@ -11,11 +11,11 @@ export default function App({ Component, pageProps }: AppProps) {
1111
const router = useRouter();
1212

1313
return (
14-
<NextUIProvider navigate={router.push}>
14+
<HeroUIProvider navigate={router.push}>
1515
<NextThemesProvider>
1616
<Component {...pageProps} />
1717
</NextThemesProvider>
18-
</NextUIProvider>
18+
</HeroUIProvider>
1919
);
2020
}
2121

‎pages/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Link } from "@nextui-org/link";
2-
import { Snippet } from "@nextui-org/snippet";
3-
import { Code } from "@nextui-org/code";
4-
import { button as buttonStyles } from "@nextui-org/theme";
1+
import { Link } from "@heroui/link";
2+
import { Snippet } from "@heroui/snippet";
3+
import { Code } from "@heroui/code";
4+
import { button as buttonStyles } from "@heroui/theme";
55

66
import { siteConfig } from "@/config/site";
77
import { title, subtitle } from "@/components/primitives";

‎tailwind.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import {nextui} from '@nextui-org/theme'
1+
import {heroui} from "@heroui/theme"
22

33
/** @type {import('tailwindcss').Config} */
44
module.exports = {
55
content: [
66
'./layouts/**/*.{js,ts,jsx,tsx,mdx}',
77
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
88
'./components/**/*.{js,ts,jsx,tsx,mdx}',
9-
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}',
9+
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
1010
],
1111
theme: {
1212
extend: {
@@ -17,5 +17,5 @@ module.exports = {
1717
},
1818
},
1919
darkMode: "class",
20-
plugins: [nextui()],
20+
plugins: [heroui()],
2121
}

0 commit comments

Comments
 (0)
Failed to load comments.