mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(installation): improve
This commit is contained in:
17
README.md
17
README.md
@@ -27,7 +27,22 @@ Read more on [ui2.nuxt.com](https://ui2.nuxt.com)
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npx nuxi@latest module add ui
|
||||
# npm
|
||||
npm install @nuxt/ui@2
|
||||
# yarn
|
||||
yarn add @nuxt/ui@2
|
||||
# pnpm
|
||||
pnpm add @nuxt/ui@2
|
||||
# bun
|
||||
bun add @nuxt/ui@2
|
||||
```
|
||||
|
||||
Next, register the `@nuxt/ui` module in your `nuxt.config.ts`:
|
||||
|
||||
```ts
|
||||
export default defineNuxtConfig({
|
||||
modules: ['@nuxt/ui']
|
||||
})
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -7,13 +7,29 @@ description: 'Learn how to install and configure Nuxt UI in your application.'
|
||||
|
||||
### Add to a Nuxt project
|
||||
|
||||
1. Add `@nuxt/ui` module to your project:
|
||||
1. Install the `@nuxt/ui` dependency in your project:
|
||||
|
||||
```bash
|
||||
npx nuxi@latest module add ui
|
||||
::code-group
|
||||
|
||||
```bash [pnpm]
|
||||
pnpm add @nuxt/ui@2
|
||||
```
|
||||
|
||||
2. Add it to the `modules` section in your `nuxt.config.ts`:
|
||||
```bash [yarn]
|
||||
yarn add @nuxt/ui@2
|
||||
```
|
||||
|
||||
```bash [npm]
|
||||
npm install @nuxt/ui@2
|
||||
```
|
||||
|
||||
```bash [bun]
|
||||
bun add @nuxt/ui@2
|
||||
```
|
||||
|
||||
::
|
||||
|
||||
2. Register the `@nuxt/ui` module in your `nuxt.config.ts`:
|
||||
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
|
||||
Reference in New Issue
Block a user