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 2 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": 8,
"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."
}
}
65 changes: 65 additions & 0 deletions docs/NextJs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div align=center>
<h1>NextJS</h1>
<img src="https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&color=black width=650">
<img src="https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white" width="100">
</div>
<br>


## 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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bade Practice:

``<body>``

Good Practice:

`<body>`


```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.


<a href="https://nextjs.org/docs/app"><img src="https://github.com/Aksshay88/Macbook/assets/119944779/1c389169-463a-42e1-b4f0-28830ed4b8a8"></a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad Practice:

<img src="img.png">

Good Practice:

<img src="img.png" alt="Image name" />

Loading