docs: update for v3.0.0 release

This commit is contained in:
Benjamin Canac
2025-03-12 16:16:37 +01:00
parent 9ba5cfe70c
commit b00f1206f6
14 changed files with 60 additions and 97 deletions

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
// import { withoutTrailingSlash } from 'ufo'
import { withoutTrailingSlash } from 'ufo'
import colors from 'tailwindcss/colors'
// import { debounce } from 'perfect-debounce'
const route = useRoute()
const appConfig = useAppConfig()
@@ -12,16 +11,6 @@ const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSe
server: false
})
const searchTerm = ref('')
// watch(searchTerm, debounce((query: string) => {
// if (!query) {
// return
// }
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
// }, 500))
const links = useLinks()
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
@@ -33,8 +22,8 @@ useHead({
{ key: 'theme-color', name: 'theme-color', content: color }
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
// { rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
{ rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
],
style: [
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 },
@@ -61,7 +50,7 @@ provide('navigation', mappedNavigation)
<NuxtLoadingIndicator color="var(--ui-primary)" :height="2" />
<template v-if="!route.path.startsWith('/examples')">
<!-- <Banner /> -->
<Banner />
<Header :links="links" />
</template>
@@ -75,7 +64,6 @@ provide('navigation', mappedNavigation)
<ClientOnly>
<LazyUContentSearch
v-model:search-term="searchTerm"
:files="files"
:groups="[{
id: 'framework',

View File

@@ -1,7 +1,7 @@
<template>
<UBanner icon="i-lucide-construction" :actions="[{ label: 'Go to Nuxt UI v2', to: 'https://ui.nuxt.com', trailingIcon: 'i-lucide-arrow-right' }]" :close="false">
<UBanner id="banner-2" icon="i-lucide-rocket">
<template #title>
You're looking at the documentation for <span class="font-semibold">Nuxt UI v3</span>!
<span class="font-semibold">Nuxt UI v3</span> is officially released!
</template>
</UBanner>
</template>

View File

@@ -41,7 +41,7 @@ const mobileLinks = computed(() => props.links.map(link => ({ ...link, defaultOp
<UDropdownMenu
v-slot="{ open }"
:modal="false"
:items="[{ label: `v${config.version}`, active: true, color: 'primary', checked: true, type: 'checkbox' }, { label: module === 'ui-pro' ? 'v1.5' : 'v2.19', to: module === 'ui-pro' ? 'https://ui.nuxt.com/pro' : 'https://ui.nuxt.com' }]"
:items="[{ label: `v${config.version}`, active: true, color: 'primary', checked: true, type: 'checkbox' }, { label: module === 'ui-pro' ? 'v1.7.1' : 'v2.21.1', to: module === 'ui-pro' ? 'https://ui2.nuxt.com/pro' : 'https://ui2.nuxt.com' }]"
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
size="xs"
>

View File

@@ -3,7 +3,7 @@ withDefaults(defineProps<{
title: string
description: string
component: string
module: string
module?: string
}>(), {
module: ''
})

View File

@@ -3,8 +3,8 @@ withDefaults(defineProps<{
title: string
description: string
headline: string
framework: string
module: string
framework?: string
module?: string
}>(), {
framework: 'nuxt',
module: ''

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import colors from 'tailwindcss/colors'
// import { debounce } from 'perfect-debounce'
import type { NuxtError } from '#app'
const props = defineProps<{
@@ -15,16 +14,6 @@ const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSe
server: false
})
const searchTerm = ref('')
// watch(searchTerm, debounce((query: string) => {
// if (!query) {
// return
// }
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
// }, 500))
const links = useLinks()
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
@@ -48,7 +37,7 @@ useHead({
})
useSeoMeta({
titleTemplate: '%s - Nuxt UI v3',
titleTemplate: '%s - Nuxt UI',
title: String(props.error.statusCode)
})
@@ -67,17 +56,16 @@ provide('navigation', mappedNavigation)
<UApp>
<NuxtLoadingIndicator color="#FFF" />
<!-- <Banner /> -->
<Banner />
<Header :links="links" />
<UError :error="error" />
<!-- <Footer /> -->
<Footer />
<ClientOnly>
<LazyUContentSearch
v-model:search-term="searchTerm"
:files="files"
:groups="[{
id: 'framework',

View File

@@ -3,7 +3,7 @@ const title = 'Roadmap'
const description = 'Discover our Volta board for @nuxt/ui development status.'
useSeoMeta({
titleTemplate: '%s - Nuxt UI v3',
titleTemplate: '%s - Nuxt UI',
title,
ogTitle: 'Nuxt UI Roadmap',
description

View File

@@ -1,14 +1,9 @@
---
navigation.title: Introduction
title: Nuxt UI v3
description: 'A comprehensive, Nuxt-integrated UI library providing a rich set of fully-styled, accessible and highly customizable components for building modern web applications.'
title: Introduction
description: '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.'
navigation.icon: i-lucide-house
---
We're thrilled to introduce this major update to our UI library, bringing significant improvements and powerful new features. Nuxt UI v3 represents a leap forward in creating robust, accessible, and highly customizable user interfaces for Nuxt applications.
## What's New in v3?
<iframe width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/_eQxomah-nA?si=pDSzchUBDKb2NQu7" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="aspect-ratio: 16/9;" class="rounded-[calc(var(--ui-radius)*1.5)]"></iframe>
### Reka UI
@@ -24,7 +19,7 @@ This transition empowers Nuxt UI to become a more comprehensive and flexible UI
### Tailwind CSS v4
Nuxt UI v3 integrates the latest Tailwind CSS v4, bringing significant improvements:
Nuxt UI integrates the latest Tailwind CSS v4, bringing significant improvements:
- **Built for performance**: Full builds in the new engine are up to 5x faster, and incremental builds are over 100x faster — and measured in microseconds.
- **Unified toolchain**: Built-in import handling, vendor prefixing, and syntax transforms, with no additional tooling required.
@@ -47,7 +42,7 @@ This integration unifies the styling of components, ensuring consistency and cod
### TypeScript Integration
Nuxt UI v3 offers significantly improved TypeScript integration, providing a superior developer experience:
Nuxt UI offers significantly improved TypeScript integration, providing a superior developer experience:
- **Enhanced Auto-completion**:
- Full auto-completion for component props based on your theme
@@ -112,11 +107,7 @@ Key points to consider:
## FAQ
::accordion
::accordion-item{label="What are the main considerations when upgrading to Nuxt UI v3?"}
The transition to v3 involves significant changes, including new component structures, updated theming approaches, and revised TypeScript definitions. We recommend a careful, incremental upgrade process, starting with thorough testing in a development environment.
::
::accordion-item{label="Is Nuxt UI v3 compatible with standalone Vue projects?"}
::accordion-item{label="Is Nuxt UI compatible with standalone Vue projects?"}
Nuxt UI is now compatible with Vue! You can follow the [installation guide](/getting-started/installation/vue) to get started.
::
@@ -124,23 +115,19 @@ Key points to consider:
We've also rebuilt Nuxt UI Pro from scratch as v3 to match Nuxt UI version. The license you bought or will buy is valid for both Nuxt UI Pro v1 and v3, this is a **free update**. You can follow the [installation guide](/getting-started/installation/pro/nuxt) to get started.
::
::accordion-item{label="Will Nuxt UI v3 work with other CSS frameworks like UnoCSS?"}
Nuxt UI v3 is currently designed to work exclusively with Tailwind CSS. While there's interest in UnoCSS support, implementing it would require significant changes to the theme structure due to differences in class naming conventions. As a result, we don't have plans to add UnoCSS support in v3.
::accordion-item{label="Will Nuxt UI work with other CSS frameworks like UnoCSS?"}
Nuxt UI is currently designed to work exclusively with Tailwind CSS. While there's interest in UnoCSS support, implementing it would require significant changes to the theme structure due to differences in class naming conventions. As a result, we don't have plans to add UnoCSS support.
::
::accordion-item{label="How does Nuxt UI v3 handle accessibility?"}
Nuxt UI v3 enhances accessibility through Reka UI integration. This provides automatic ARIA attributes, keyboard navigation support, intelligent focus management, and screen reader announcements. While offering a strong foundation, proper implementation and testing in your specific use case remains crucial for full accessibility compliance. For more detailed information, refer to [Reka UI's accessibility documentation](https://reka-ui.com/docs/overview/accessibility).
::accordion-item{label="How does Nuxt UI handle accessibility?"}
Nuxt UI enhances accessibility through Reka UI integration. This provides automatic ARIA attributes, keyboard navigation support, intelligent focus management, and screen reader announcements. While offering a strong foundation, proper implementation and testing in your specific use case remains crucial for full accessibility compliance. For more detailed information, refer to [Reka UI's accessibility documentation](https://reka-ui.com/docs/overview/accessibility).
::
::accordion-item{label="What is the testing approach for Nuxt UI v3?"}
Nuxt UI v3 ensures reliability with 1000+ Vitest tests, covering core functionality and accessibility. This robust testing suite supports the library's stability and serves as a reference for developers.
::
::accordion-item{label="Is this version stable and suitable for production use?"}
Nuxt UI v3 is now in beta and is stable enough to be used in production. We now recommend using v3 over v2. We welcome feedback from users to help improve the library further. Feel free to report any issues you encounter on our [GitHub repository](https://github.com/nuxt/ui/issues).
::accordion-item{label="What is the testing approach for Nuxt UI?"}
Nuxt UI ensures reliability with 1000+ Vitest tests, covering core functionality and accessibility. This robust testing suite supports the library's stability and serves as a reference for developers.
::
::
:hr
We're excited about the possibilities Nuxt UI v3 brings to your projects. Explore our documentation to learn more about new features, components, and best practices for building powerful, accessible user interfaces with Nuxt UI v3.
We're excited about the possibilities Nuxt UI v3 brings to your projects. Explore our documentation to learn more about new features, components, and best practices for building powerful, accessible user interfaces.

View File

@@ -20,24 +20,24 @@ Looking for the **Vue** version?
::steps{level="4"}
#### Install the Nuxt UI v3 beta package
#### Install the Nuxt UI package
::code-group{sync="pm"}
```bash [pnpm]
pnpm add @nuxt/ui@next
pnpm add @nuxt/ui
```
```bash [yarn]
yarn add @nuxt/ui@next
yarn add @nuxt/ui
```
```bash [npm]
npm install @nuxt/ui@next
npm install @nuxt/ui
```
```bash [bun]
bun add @nuxt/ui@next
bun add @nuxt/ui
```
::
@@ -108,7 +108,7 @@ The `App` component provides global configurations and is required for **Toast**
### Use our Nuxt Starter
Start your project using the [nuxt/starter#ui3](https://github.com/nuxt/starter/tree/ui3) template with Nuxt UI v3 pre-configured.
Start your project using the [nuxt/starter#ui](https://github.com/nuxt/starter/tree/ui) template with Nuxt UI pre-configured.
Create a new project locally by running the following command:
@@ -225,15 +225,15 @@ This option adds the `transition-colors` class on components with hover or activ
## Continuous Releases
Nuxt UI v3 uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Nuxt UI uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
```diff [package.json]
{
"dependencies": {
- "@nuxt/ui": "^3.0.0-beta.3",
+ "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@83725ac",
- "@nuxt/ui": "^3.0.0",
+ "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4c96909",
}
}
```

View File

@@ -20,24 +20,24 @@ Looking for the **Nuxt** version?
::steps{level="4"}
#### Install the Nuxt UI v3 beta package
#### Install the Nuxt UI package
::code-group{sync="pm"}
```bash [pnpm]
pnpm add @nuxt/ui@next
pnpm add @nuxt/ui
```
```bash [yarn]
yarn add @nuxt/ui@next
yarn add @nuxt/ui
```
```bash [npm]
npm install @nuxt/ui@next
npm install @nuxt/ui
```
```bash [bun]
bun add @nuxt/ui@next
bun add @nuxt/ui
```
::
@@ -168,7 +168,7 @@ The `App` component provides global configurations and is required for **Toast**
### Use our Vue starter
Start your project using the [nuxtlabs/nuxt-ui-vue-starter](https://github.com/nuxtlabs/nuxt-ui-vue-starter) template with Nuxt UI v3 pre-configured.
Start your project using the [nuxtlabs/nuxt-ui-vue-starter](https://github.com/nuxtlabs/nuxt-ui-vue-starter) template with Nuxt UI pre-configured.
Create a new project locally by running the following command:
@@ -313,15 +313,15 @@ This option adds the `transition-colors` class on components with hover or activ
## Continuous Releases
Nuxt UI v3 uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Nuxt UI uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
```diff [package.json]
{
"dependencies": {
- "@nuxt/ui": "^3.0.0-beta.3",
+ "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@83725ac",
- "@nuxt/ui": "^3.0.0",
+ "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4c96909",
}
}
```

View File

@@ -56,19 +56,19 @@ npx @tailwindcss/upgrade
::::code-group{sync="pm"}
```bash [pnpm]
pnpm add @nuxt/ui@next
pnpm add @nuxt/ui
```
```bash [yarn]
yarn add @nuxt/ui@next
yarn add @nuxt/ui
```
```bash [npm]
npm install @nuxt/ui@next
npm install @nuxt/ui
```
```bash [bun]
bun add @nuxt/ui@next
bun add @nuxt/ui
```
::::
@@ -81,19 +81,19 @@ bun add @nuxt/ui@next
::::code-group{sync="pm"}
```bash [pnpm]
pnpm add @nuxt/ui-pro@next
pnpm add @nuxt/ui-pro
```
```bash [yarn]
yarn add @nuxt/ui-pro@next
yarn add @nuxt/ui-pro
```
```bash [npm]
npm install @nuxt/ui-pro@next
npm install @nuxt/ui-pro
```
```bash [bun]
bun add @nuxt/ui-pro@next
bun add @nuxt/ui-pro
```
::::

View File

@@ -6,7 +6,7 @@ navigation.icon: i-lucide-swatch-book
## Tailwind CSS
Nuxt UI v3 uses Tailwind CSS v4, you can read the official [upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3) to learn about all the breaking changes.
Nuxt UI uses Tailwind CSS v4, you can read the official [upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3) to learn about all the breaking changes.
### `@theme`

View File

@@ -1,13 +1,13 @@
---
title: Contribution Guide
description: 'A comprehensive guide on contributing to Nuxt UI v3, including project structure, development workflow, and best practices.'
description: 'A comprehensive guide on contributing to Nuxt UI, including project structure, development workflow, and best practices.'
navigation: false
---
Nuxt UI thrives thanks to its incredible community ❤️. We welcome all contributions through bug reports, pull requests, and feedback to help make this library even better.
::caution
Before reporting a bug or requesting a feature, make sure that you have read through our [documentation](https://ui3.nuxt.dev/) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue%20is%3Aopen%20sort%3Aupdated-desc%20label%3Av3).
Before reporting a bug or requesting a feature, make sure that you have read through our [documentation](https://ui.nuxt.com/) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue%20is%3Aopen%20sort%3Aupdated-desc%20label%3Av3).
::
## Project Structure

View File

@@ -34,7 +34,7 @@ export default defineNuxtConfig({
},
$production: {
site: {
url: 'https://ui3.nuxt.dev'
url: 'https://ui.nuxt.com'
}
},
@@ -170,12 +170,12 @@ export default defineNuxtConfig({
},
llms: {
domain: 'https://ui3.nuxt.dev',
title: 'Nuxt UI v3',
domain: 'https://ui.nuxt.com',
title: 'Nuxt UI',
description: 'A comprehensive, Nuxt-integrated UI library providing a rich set of fully-styled, accessible and highly customizable components for building modern web applications.',
full: {
title: 'Nuxt UI v3 Full Documentation',
description: 'This is the full documentation for Nuxt UI v3. It includes all the Markdown files written with the MDC syntax.'
title: 'Nuxt UI Full Documentation',
description: 'This is the full documentation for Nuxt UI. It includes all the Markdown files written with the MDC syntax.'
},
sections: [
{