Skip to main content

Command Palette

Search for a command to run...

How to Install Nuxtlabs UI in NuxtJS

Published
1 min read
How to Install Nuxtlabs UI in NuxtJS
R

As a humble web developer, I have a passion for sharing information with others, fostering learning and collaboration within the community.

In this tutorial, I will show you how to install Nuxtlabs UI in Nuxt 3.

Create Nuxtjs Project

Run below command in terminal to install nuxt 3 project.

# using npx
npx nuxi@latest init <project-name>
# using pnpm
pnpm dlx nuxi@latest init <project-name>

Move to project.

cd <project-name>

Install the dependencies:

# using npm
npm install
# using pnpm
pnpm install
# using yarn
yarn install

Install Nuxtlabs UI in Nuxt 3

Run below command to install Nuxtlabs UI in Nuxt 3.

# using npm 
npm install -D @nuxthq/ui
# using yarn
yarn add -D @nuxthq/ui
# using pnpm
pnpm i -D @nuxthq/ui

Add @nuxthq/ui modules in your nuxt.config section.

export default defineNuxtConfig({
 modules: ['@nuxthq/ui']
})

app.vue

Vue

<template>
  <div class="space-x-4">
    <UBadge>Badge</UBadge>
    <UButton>Button</UButton>
    <UButton color="violet" variant="solid">Button</UButton>
    <UButton color="cyan" variant="outline">Button</UButton>
  </div>
</template>

nuxtlabs ui in nuxt 3 button

Originally published at webvees.com

More from this blog

web250

19 posts

Web developer & UI/UX designer who loves Rick and Morty and anime. Skilled in front-end (HTML, CSS, JS), back-end (Node.js, laravel), and design (Figma). Inspired by creative storytelling.