Convert Figma logo to code with AI

nuxt logoui

The Intuitive Vue UI Library powered by Reka UI & Tailwind CSS.

5,573
885
5,573
249

Top Related Projects

A utility-first CSS framework for rapid UI development.

40,884

🐉 Vue Component Framework

27,030

Quasar Framework - Build high-performance VueJS user interfaces in record time

40,131

Chakra UI is a component system for building SaaS products with speed ⚡️

88,611

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

13,922

Next Generation Vue UI Component Library

Quick Overview

Nuxt UI is a fully styled and customizable components library for Nuxt 3. It provides a set of ready-to-use Vue components that are designed to work seamlessly with Nuxt.js, offering a balance between ease of use and customization.

Pros

  • Seamless integration with Nuxt 3 projects
  • Fully customizable components with TailwindCSS
  • Comprehensive set of pre-built components
  • TypeScript support for improved developer experience

Cons

  • Limited to Nuxt 3 projects, not usable in vanilla Vue.js applications
  • Learning curve for developers new to Nuxt or TailwindCSS
  • Potential performance overhead due to the inclusion of TailwindCSS

Code Examples

  1. Using a basic button component:
<template>
  <UButton>Click me</UButton>
</template>
  1. Creating a form with input and select components:
<template>
  <UForm :schema="formSchema" @submit="onSubmit">
    <UFormGroup label="Name" name="name">
      <UInput v-model="form.name" />
    </UFormGroup>
    <UFormGroup label="Country" name="country">
      <USelect v-model="form.country" :options="countries" />
    </UFormGroup>
    <UButton type="submit">Submit</UButton>
  </UForm>
</template>

<script setup>
const form = reactive({
  name: '',
  country: ''
})

const countries = [
  { label: 'United States', value: 'US' },
  { label: 'Canada', value: 'CA' },
  { label: 'Mexico', value: 'MX' }
]

const formSchema = {
  name: z.string().min(2),
  country: z.string()
}

const onSubmit = (data) => {
  console.log(data)
}
</script>
  1. Using a modal component:
<template>
  <UButton @click="isOpen = true">Open Modal</UButton>
  <UModal v-model="isOpen">
    <UCard>
      <template #header>
        <h3 class="text-base font-semibold leading-6 text-gray-900">Modal Title</h3>
      </template>
      <p>This is the modal content.</p>
      <template #footer>
        <UButton @click="isOpen = false">Close</UButton>
      </template>
    </UCard>
  </UModal>
</template>

<script setup>
const isOpen = ref(false)
</script>

Getting Started

  1. Install Nuxt UI in your Nuxt 3 project:

    npm install @nuxt/ui
    
  2. Add Nuxt UI to your nuxt.config.ts:

    export default defineNuxtConfig({
      modules: ['@nuxt/ui']
    })
    
  3. Start using Nuxt UI components in your Vue templates:

    <template>
      <UContainer>
        <UHeading>Welcome to Nuxt UI</UHeading>
        <UButton>Get Started</UButton>
      </UContainer>
    </template>
    

Competitor Comparisons

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • More flexible and customizable, allowing for fine-grained control over styles
  • Larger ecosystem and community support, with numerous plugins and resources available
  • Framework-agnostic, can be used with any JavaScript framework or vanilla HTML

Cons of Tailwind CSS

  • Steeper learning curve, requiring familiarity with utility classes and configuration
  • Can lead to verbose HTML markup, potentially reducing readability
  • Requires additional setup and configuration for optimal use

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Click me
</button>

Nuxt UI:

<UButton color="blue" label="Click me" />

Summary

Tailwind CSS offers more flexibility and customization options, making it suitable for a wide range of projects. It has a larger ecosystem but requires more setup and learning. Nuxt UI, on the other hand, provides pre-built components that are easier to use out of the box, especially within the Nuxt.js ecosystem. The choice between the two depends on project requirements, development speed, and team expertise.

40,884

🐉 Vue Component Framework

Pros of Vuetify

  • Extensive component library with 80+ pre-built components
  • Robust documentation and large community support
  • Material Design compliance out of the box

Cons of Vuetify

  • Larger bundle size due to comprehensive feature set
  • Steeper learning curve for customization
  • Less flexibility in design compared to more minimal libraries

Code Comparison

Vuetify:

<template>
  <v-app>
    <v-btn color="primary">Click me</v-btn>
  </v-app>
</template>

UI:

<template>
  <UButton color="primary">Click me</UButton>
</template>

Key Differences

  • UI is specifically designed for Nuxt 3, while Vuetify supports Vue 2 and 3
  • Vuetify offers a more comprehensive set of components and features
  • UI provides a lighter-weight alternative with a focus on simplicity
  • Vuetify follows Material Design guidelines, while UI allows for more custom styling

Use Cases

  • Choose Vuetify for large-scale applications requiring a wide range of pre-built components
  • Opt for UI when building Nuxt 3 projects that prioritize simplicity and smaller bundle sizes

Community and Support

  • Vuetify has a larger community and more third-party resources
  • UI benefits from direct integration with the Nuxt ecosystem
27,030

Quasar Framework - Build high-performance VueJS user interfaces in record time

Pros of Quasar

  • Comprehensive UI framework with a wide range of components and utilities
  • Cross-platform support for web, mobile, and desktop applications
  • Active community and extensive documentation

Cons of Quasar

  • Steeper learning curve due to its extensive feature set
  • Larger bundle size compared to more lightweight alternatives
  • Less flexibility in customizing the look and feel of components

Code Comparison

Quasar:

<template>
  <q-btn color="primary" label="Click me" @click="handleClick" />
</template>

<script>
export default {
  methods: {
    handleClick() {
      // Handle click event
    }
  }
}
</script>

UI:

<template>
  <UButton color="primary" @click="handleClick">Click me</UButton>
</template>

<script setup>
const handleClick = () => {
  // Handle click event
}
</script>

Summary

Quasar offers a more comprehensive solution for building cross-platform applications with a rich set of components and features. However, this comes at the cost of a steeper learning curve and larger bundle size. UI, on the other hand, provides a more lightweight and flexible approach, focusing on web applications within the Nuxt ecosystem. The choice between the two depends on the specific project requirements and development preferences.

40,131

Chakra UI is a component system for building SaaS products with speed ⚡️

Pros of Chakra UI

  • More extensive component library with a wider range of pre-built UI elements
  • Greater flexibility in customization through its theme system
  • Larger community and ecosystem, leading to more resources and third-party extensions

Cons of Chakra UI

  • Steeper learning curve due to its more complex API and configuration options
  • Larger bundle size, which may impact initial load times for applications
  • Not specifically optimized for Nuxt.js or Vue.js ecosystems

Code Comparison

Chakra UI (React):

import { Box, Button } from '@chakra-ui/react'

function Example() {
  return (
    <Box>
      <Button colorScheme="blue">Click me</Button>
    </Box>
  )
}

Nuxt UI (Vue):

<template>
  <UContainer>
    <UButton color="primary">Click me</UButton>
  </UContainer>
</template>

Both libraries offer a component-based approach to building user interfaces, but Chakra UI is primarily designed for React applications, while Nuxt UI is tailored for Vue.js and Nuxt.js projects. Chakra UI provides more granular control over styling and a larger set of components, whereas Nuxt UI offers a more streamlined experience specifically for Nuxt.js developers with Vue-friendly syntax and integration.

88,611

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

Pros of Storybook

  • Broader ecosystem support, works with multiple frameworks (React, Vue, Angular, etc.)
  • More extensive documentation and community resources
  • Advanced features like addons for testing, accessibility, and design systems

Cons of Storybook

  • Steeper learning curve and more complex setup
  • Heavier bundle size and potential performance impact
  • Not as tightly integrated with specific frameworks like Nuxt

Code Comparison

Storybook component story:

export default {
  title: 'Button',
  component: Button,
};

export const Primary = () => <Button primary>Button</Button>;

Nuxt UI component usage:

<template>
  <UButton color="primary">Button</UButton>
</template>

Key Differences

  • Storybook focuses on isolated component development and documentation
  • Nuxt UI is a ready-to-use component library specifically for Nuxt.js projects
  • Storybook requires more configuration but offers greater flexibility
  • Nuxt UI provides a more streamlined experience within the Nuxt ecosystem

Use Cases

  • Choose Storybook for large-scale projects with multiple frameworks or complex design systems
  • Opt for Nuxt UI when building Nuxt.js applications and seeking rapid development with pre-built components
13,922

Next Generation Vue UI Component Library

Pros of PrimeVue

  • Larger component library with more diverse and complex UI elements
  • Framework-agnostic, can be used with various Vue.js projects
  • Extensive theming and customization options

Cons of PrimeVue

  • Steeper learning curve due to the extensive API and options
  • Potentially larger bundle size if not using tree-shaking
  • Less integrated with Nuxt.js ecosystem

Code Comparison

PrimeVue:

<template>
  <Button label="Click me" icon="pi pi-check" />
  <DataTable :value="products">
    <Column field="name" header="Name"></Column>
    <Column field="price" header="Price"></Column>
  </DataTable>
</template>

Nuxt UI:

<template>
  <UButton label="Click me" icon="i-heroicons-check" />
  <UTable :columns="columns" :rows="products" />
</template>

Summary

PrimeVue offers a more comprehensive set of components and is framework-agnostic, making it suitable for various Vue.js projects. However, it may have a steeper learning curve and potentially larger bundle size. Nuxt UI, while having fewer components, is more tightly integrated with the Nuxt.js ecosystem and may offer a simpler API for basic use cases. The choice between the two depends on project requirements, desired customization level, and integration needs with Nuxt.js.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Nuxt UI

Nuxt UI

npm version npm downloads License Nuxt

Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.

[!NOTE] You are on the v3 development branch, check out the v2 branch for Nuxt UI v2.

[!TIP] Looking for more components ? Check out Nuxt UI Pro, a collection of premium Vue components, composables, and utilities built on top of Nuxt UI for faster and more powerful app development.

Documentation

Visit https://ui.nuxt.com to explore the documentation.

Installation

pnpm add @nuxt/ui
yarn add @nuxt/ui
npm install @nuxt/ui
bun add @nuxt/ui

Nuxt

  1. Add the Nuxt UI module in your nuxt.config.ts:
export default defineNuxtConfig({
  modules: ['@nuxt/ui']
})
  1. Import Tailwind CSS and Nuxt UI in your CSS:
@import "tailwindcss";
@import "@nuxt/ui";

Learn more in the installation guide.

Vue

  1. Add the Nuxt UI Vite plugin in your vite.config.ts:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'

export default defineConfig({
  plugins: [
    vue(),
    ui()
  ]
})
  1. Use the Nuxt UI Vue plugin in your main.ts:
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import ui from '@nuxt/ui/vue-plugin'
import App from './App.vue'

const app = createApp(App)

const router = createRouter({
  routes: [],
  history: createWebHistory()
})

app.use(router)
app.use(ui)

app.mount('#app')
  1. Import Tailwind CSS and Nuxt UI in your CSS:
@import "tailwindcss";
@import "@nuxt/ui";

Learn more in the installation guide.

Contribution

Thank you for considering contributing to Nuxt UI. Here are a few ways you can get involved:

  • Reporting Bugs: If you come across any bugs or issues, please check out the reporting bugs guide to learn how to submit a bug report.
  • Suggestions: Have any thoughts to enhance Nuxt UI? We'd love to hear them! Check out the contribution guide to share your suggestions.

Local Development

Follow the docs to set up your local development environment and contribute.

Credits

License

Licensed under the MIT license.

NPM DownloadsLast 30 Days