Skip to content

NextJs docs has been added #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/NextJs/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Next",
"position": 12,
"link": {
"type": "generated-index",
"description": "Next is a JavaScript library for building user interfaces. It is maintained by a community of individual developers and companies."
}
}
Binary file added docs/NextJs/emty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions docs/NextJs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
id: next-js
title: Next Js Getting Started
sidebar_label: Next JS
sidebar_position: 26
tags: [NextJS, Routing, Page Routing]
description: This docs contains about the Next JS documentation
---


## Get Started

To start using Aceternity UI in your projects, simply install the library via your preferred package manager:

### Next.js

```bash
npx create-next-app@latest
```
On Installation, you will be prompted to choose a template. Select the default template and proceed with the installation.

```bash
What is your project named? my-app
Would you like to use TypeScript? No / Yes
Would you like to use ESLint? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like to use `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to customize the default import alias (@/*)? No / Yes
What import alias would you like configured? @/*

```
After the prompts, `create-next-app` will create a folder with your project name and install the required dependencies.

Create a root layout inside `app/layout.tsx` with the required `<html>` and `<body>` tags:

```tsx
// app/layout.tsx

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
```
Finally, create a home page `app/page.tsx` with some initial content:

```tsx
// app/page.tsx
export default function Page() {
return <h1>Hello, Next.js!</h1>
}
```
Now, you can start the development server:

Run `npm run dev` to start the development server.
Visit `http://localhost:3000` to view your application.
Edit `app/page.tsx` (or `pages/index.tsx`) file and save it to see the updated result in your browser.
Loading