Skip to content

Commit e662cd0

Browse files
authored
Merge pull request #360 from Aksshay88/main
NextJs docs has been added
2 parents f52e5b2 + f9f3531 commit e662cd0

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

docs/NextJs/_category_.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Next",
3+
"position": 12,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Next is a JavaScript library for building user interfaces. It is maintained by a community of individual developers and companies."
7+
}
8+
}

docs/NextJs/emty.png

2.15 KB
Loading

docs/NextJs/index.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
id: next-js
3+
title: Next Js Getting Started
4+
sidebar_label: Next JS
5+
sidebar_position: 26
6+
tags: [NextJS, Routing, Page Routing]
7+
description: This docs contains about the Next JS documentation
8+
---
9+
10+
11+
## Get Started
12+
13+
To start using Aceternity UI in your projects, simply install the library via your preferred package manager:
14+
15+
### Next.js
16+
17+
```bash
18+
npx create-next-app@latest
19+
```
20+
On Installation, you will be prompted to choose a template. Select the default template and proceed with the installation.
21+
22+
```bash
23+
What is your project named? my-app
24+
Would you like to use TypeScript? No / Yes
25+
Would you like to use ESLint? No / Yes
26+
Would you like to use Tailwind CSS? No / Yes
27+
Would you like to use `src/` directory? No / Yes
28+
Would you like to use App Router? (recommended) No / Yes
29+
Would you like to customize the default import alias (@/*)? No / Yes
30+
What import alias would you like configured? @/*
31+
32+
```
33+
After the prompts, `create-next-app` will create a folder with your project name and install the required dependencies.
34+
35+
Create a root layout inside `app/layout.tsx` with the required `<html>` and `<body>` tags:
36+
37+
```tsx
38+
// app/layout.tsx
39+
40+
export default function RootLayout({
41+
children,
42+
}: {
43+
children: React.ReactNode
44+
}) {
45+
return (
46+
<html lang="en">
47+
<body>{children}</body>
48+
</html>
49+
)
50+
}
51+
```
52+
Finally, create a home page `app/page.tsx` with some initial content:
53+
54+
```tsx
55+
// app/page.tsx
56+
export default function Page() {
57+
return <h1>Hello, Next.js!</h1>
58+
}
59+
```
60+
Now, you can start the development server:
61+
62+
Run `npm run dev` to start the development server.
63+
Visit `http://localhost:3000` to view your application.
64+
Edit `app/page.tsx` (or `pages/index.tsx`) file and save it to see the updated result in your browser.

0 commit comments

Comments
 (0)