A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
MIT License
Bot releases are hidden (Show)
unmount
prop to allow lazy mounting for heavy components (#1590) (91e5002)checkbox
ui config (#1409) (8b54660)min-w-0
on wrapper to truncate (9f01145), closes #1650
Full Changelog: https://github.com/nuxt/ui/compare/v2.15.1...v2.15.2
Published by benjamincanac 7 months ago
@change
event value (#1580) (c98d6e3)w-full
only on horizontal wrapper (#1565) (bd8b737)mouseenter
event on container (7288953)file
type and change
events (#1570) (878f707)mouseenter
event on container (8517897), closes #1564
Full Changelog: https://github.com/nuxt/ui/compare/v2.15.0...v2.15.1
Published by benjamincanac 7 months ago
Read our updated documentation on https://ui.nuxt.com/.
This is a smaller update than usual but as you might know we're hard at work making the next major release of Nuxt UI, you can read more about it in #1289.
This PR includes a small breaking change on the URange
, USelect
and UCheckbox
components: the @change
event's payload is now the input's value instead of the HTML event to match other inputs.
open
event with index (#1559) (224ec3c)icon
& avatar
slots (#1401) (cee3e12)loading
prop (#1546) (e1e05af)data-n-ids
to root element (#1495) (a2b8b70)import.meta.*
properties (#1561) (cc62e34)@touchstart.passive
instead of @touchstart.prevent
(#1520) (a563d8f)filteredOptions
might be undefined (#1541) (b0ecac5)Boolean
type as model value (#1550) (c49f899)Full Changelog: https://github.com/nuxt/ui/compare/v2.14.2...v2.15.0
Published by benjamincanac 8 months ago
description
alignment when no title provided (ca4f06a), closes #1408
FormGroup
(#1427) (6e77f1d)hover
mode on touch devices (70bf4a7)relative
class to icon (0a4a9e3)overflow-hidden
(#1460) (002129c)description
alignment when no title provided (9cce445)hover
mode on touch devices (b50fbcf)fieldset
config (2d64b50), closes #1472
null
model value (4b6e80e), closes #1421
relative
class to icon (0b29dd4), closes #1245
Full Changelog: https://github.com/nuxt/ui/compare/v2.14.1...v2.14.2
Published by benjamincanac 8 months ago
Full Changelog: https://github.com/nuxt/ui/compare/v2.14.0...v2.14.1
Published by benjamincanac 8 months ago
Read our updated documentation on https://ui.nuxt.com.
size
prop (#1307) (cbeede6)useId
to bind input labels (#1211) (27c71fa)file
(946a39c), closes #563
loading
(#1362) (3fe3521)unmount
prop as false
by default (843a978), closes #663
maxrows
prop to restrict autoresize (#1302) (f643e7b)required
title to prevent warning when using slot (e545b6f)body
padding without default slot (f682905)3.4
(#1199) (10db144)validate
path type (#1370) (5266591)disabled
prop before navigating (#1321) (ac42ec1)Icon
component (f8b296f), closes #1328
bun
(bb40c31), closes #809
all
option in icons plugin (412cd75), closes #1237
required
title to prevent warning when using slot (aa2b1ca)NaN
percent display when indeterminate (a55a08a)help
prop to radio children (5a5b284), closes #1313
popper
key (9f35297), closes #1393
Full Changelog: https://github.com/nuxt/ui/compare/v2.13.0...v2.14.0
Published by benjamincanac 9 months ago
Read our updated documentation on https://ui.nuxt.com.
The Carousel
component allows you to display images or content in a scrollable area and comes with drag to scroll support, navigation buttons, indicators, etc.
Much like the VerticalNavigation, the HorizontalNavigation
component comes in handy when you need to display a list of horizontal links.
We've updated the Breadcrumb
, CommandPalette
, Dropdown
, InputMenu
, SelectMenu
and VerticalNavigation
components config to be consistent with the Button
default sm
size.
If you take a look at this example with many components, you can see that everything is now perfectly aligned and has the same size:
<template>
<UContainer class="min-h-screen flex items-center">
<div class="w-80 space-y-2">
<UCommandPalette :groups="[{ key: 'links', commands: links }]" :searchable="false" class="-mx-2" />
<UVerticalNavigation :links="links" />
<UHorizontalNavigation :links="links" />
<UInput :icon="selected.icon" :options="links" :placeholder="selected.label" />
<UInputMenu v-model="selected" :icon="selected.icon" :options="links" />
<USelect :icon="selected.icon" :options="links" :placeholder="selected.label" />
<USelectMenu v-model="selected" :icon="selected.icon" :options="links" />
<UDropdown :items="[links]" :popper="{ placement: 'bottom-start' }" class="w-full">
<UButton color="white" :icon="selected.icon" :label="selected.label" class="w-full" />
</UDropdown>
<UBreadcrumb :links="links" class="ml-2.5" />
<UAccordion :items="links" color="gray" variant="ghost" />
</div>
</UContainer>
</template>
<script setup>
const links = [{
label: 'Installation',
icon: 'i-heroicons-home',
to: '/getting-started/installation'
}, {
label: 'Vertical Navigation',
icon: 'i-heroicons-chart-bar',
to: '/navigation/vertical-navigation'
}, {
label: 'Command Palette',
icon: 'i-heroicons-command-line',
to: '/navigation/command-palette'
}]
const selected = ref(links[0])
</script>
It is not shown by the screenshot but labels and icons inside the Dropdown
/ InputMenu
/ SelectMenu
menus now also match.
Here's the list of commits if you want to know exactly what changed:
There are still some improvements left to reflect the
size
prop on the actual menus as mentioned in #446.
Since the first release of @nuxt/ui
and the launch of @nuxt/ui-pro
, more and more components have been added to the docs. There are now at least 90+ components if you combine the two packages.
To ease the navigation between all these components, we removed all the categories like Elements
, Forms
, Landing
, etc. for both @nuxt/ui
and @nuxt/ui-pro
to group everything under Components
. This should remove a lot of clicks to find the component you're looking for.
We also removed the Pro
popover in the header to access Nuxt UI Pro, you can now use the Docs
and Pro
links instead to switch between the two or use the top left dropdown to switch between @nuxt/ui
, @nuxt/ui-edge
and @nuxt/ui-pro
packages.
The Nuxt UI Pro landing page has been merged at the bottom of https://ui.nuxt.com, and new Pricing and Templates pages are now available in the header.
validate
(#1273) (20ac4b3)nullable
prop when clearing input (5e49fb8)close-prevented
event (#1207) (6faf15b)Badge
component for consistency (3e81eee)active
prop to slot as isActive
(b76e761)Full Changelog: https://github.com/nuxt/ui/compare/v2.12.3...v2.13.0
Published by benjamincanac 9 months ago
Full Changelog: https://github.com/nuxt/ui/compare/v2.12.2...v2.12.3
Published by benjamincanac 9 months ago
rel
type (05e90aa)Full Changelog: https://github.com/nuxt/ui/compare/v2.12.1...v2.12.2
Published by benjamincanac 9 months ago
nuxt-component-meta
(d3e19dc), closes #578
option-attribute
into account to display label (1a93791)type
bind on <a>
(b0df864)option-attribute
into account to display label (b9fe74b), closes #1151
Full Changelog: https://github.com/nuxt/ui/compare/v2.12.0...v2.12.1
Published by benjamincanac 9 months ago
Read our updated documentation on https://ui.nuxt.com.
InputMenu
componentLike the SelectMenu
, it allows you to create an autocomplete input with real-time suggestions.
labelClass
and merge iconClass
(f623ec1)labelClass
and merge iconClass
(1c9835d), closes #716
submit
function (#1186) (4a25a12)disabled
prop (0976833), closes #1189
empty
slot when no options (5d1919a), closes #1089
sort-mode
prop (56e0c9a), closes #1149
labelClass
and merge iconClass
(a79f7c0)overflow-hidden
on wrapper (4124406), closes #806 #1034
avatar
size (b22bd70)hover
mode (c6aa421), closes #1179
class
(7151b7b), closes #1157
clear
by path (#1165) (97a3975)loading
(3258167), closes #1117
active
override when value is false (83631cc)hover
mode (bc00f9c), closes #781
option.disabled
to children (0c8ab9d), closes #1109
change
event (4c84839), closes #1113
contenteditable="plaintext-only"
elements in usingInput
(#1159) (648eec3)Full Changelog: https://github.com/nuxt/ui/compare/v2.11.1...v2.12.0
Published by benjamincanac 10 months ago
default
children (f07968a), closes #1076
Record<string, any>>
instead of object
(4d72a75)popper
weak type (5718dfd), closes #644
Full Changelog: https://github.com/nuxt/ui/compare/v2.11.0...v2.11.1
Published by benjamincanac 11 months ago
Read our updated documentation on https://ui.nuxt.com.
Breadcrumb
componentChip
componentThis component behave exactly like the chip
prop on the Avatar
and is meant to replace it in the next major version. The advantage of having a specific component for this is to be able to use on any component:
We've introduced prop types with validators in https://github.com/nuxt/ui/releases/tag/v2.9.0 to enable autocomplete. Initially, this feature was compatible only with the default configuration of @nuxt/ui
. Now, autocomplete functionality extends to custom values specified in your app.config.ts
. As an illustration, consider the following definition in app.config.ts
:
export default defineAppConfig({
ui: {
button: {
color: {
custom: {
subtle: '...'
}
}
}
}
})
Autocomplete will now function for the color
and variant
props of the Button
and include your custom values:
The Icon
component now has a dynamic
prop that will use nuxt-icon instead of the default behaviour with egoist/tailwindcss-icons.
This can be quite useful when using dynamic class names or for icons coming from a database for example.
This behaviour can be changed globally in your app.config.ts
through ui.icons.dynamic
:
export default defineAppConfig({
ui: {
primary: 'green',
gray: 'slate',
icons: {
dynamic: true
}
}
})
The ui.icons
option in your nuxt.config.ts
can now be an object to completely override the @egoist/tailwindcss-icons
plugin, this can be quite useful if you want to use a custom icon collection for example:
import { getIconCollections } from '@egoist/tailwindcss-icons'
export default defineNuxtConfig({
ui: {
icons: {
// might solve stretch bug on generate, see https://github.com/egoist/tailwindcss-icons/issues/23
extraProperties: {
'-webkit-mask-size': 'contain',
'-webkit-mask-position': 'center'
},
collections: {
foo: {
icons: {
'arrow-left': {
// svg body
body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />',
// svg width and height, optional
width: 24,
height: 24
}
}
},
...getIconCollections(['heroicons', 'simple-icons'])
}
}
}
})
There is an open issue #877 to reduce the final bundle size as Tailwind CSS generate classes for all the components at the moment. As a first step to solve this, we've splitted the config of each component into separate files in #930 so you can have at least the option to exclude files manually in your tailwind.config.ts
:
import { resolve } from 'pathe'
import type { Config } from 'tailwindcss'
export default <Partial<Config>>{
content: {
files: [
'!' + resolve('node_modules/@nuxt/ui/dist/runtime/ui.config/data/table.mjs'),
'!' + resolve('node_modules/@nuxt/ui/dist/runtime/ui.config/overlays/modal.mjs')
]
}
}
label
, required
and help
size (a1b38c4)nuxt-icon
with dynamic
prop or app config (#862) (c601fc6)@egoist/tailwindcss-icons
plugin (#1013) (ec58948)size
prop (#950) (3c71bf3)app.config.ts
(#863) (7339324)gap
when no close button or action (9a1a1b8), closes #831
-
key (#962) (de38afd)click
function (60fa2be)NuxtLink
with custom
prop to close on select (f323379), closes #899
v-model
modifiers (#856) (68f6956)active
state when to
prop is not provided (6cc77a3), closes #988
active
prop (15a40f5), closes nuxt/nuxt.com#1432
boolean
types and bump nuxt to 3.8.2
(#1006) (ca62ce1)#ui-colors
(#913) (c84438f)gap
when no close button or action (ded6a7f)body
(#909) (8451f4d)help
text from inlining with label (#894) (a2d70f0)Full Changelog: https://github.com/nuxt/ui/compare/v2.10.0...v2.11.0
Published by benjamincanac 12 months ago
Read our updated documentation on https://ui.nuxt.com.
Divider
componentRadioGroup
componentProgress
componentMeter/MeterGroup
componentsfilter
attribute in groups (#871) (8ba2a79)@error
event (#718) (e16379f)arrow
option & popper
docs (#875) (f785ecd)2xs
, xs
, xl
and 2xl
sizes to match progress component (3cb3914), closes #673
v-model:sort
prop (#803) (9f4d88e)NuxtLink
instead of ULink
(#882) (c37ad8b)fullscreen
enabled (550ac10), closes #811
@select
event call when selecting all rows (#838) (51f4d54)app.config.ts
(button colors) (7be2af7), closes #858
A huge thank you to everyone who contributed to make this release, this is truly an awesome community ❤️
Full Changelog: https://github.com/nuxt/ui/compare/v2.9.0...v2.10.0
Published by benjamincanac about 1 year ago
Read our updated documentation on https://ui.nuxt.com
This release focuses on performance and DX:
Props having a validator are now typed to provide autocomplete
Lodash has been completely removed from @nuxt/ui
Overall bundle size has been greatly reduced by only loading the config of the components used
app.config.ts
now also uses tailwind-merge like the ui
prop to smartly merge classes
Like #509 in https://github.com/nuxt/ui/releases/tag/v2.8.0, breaking changes might occur but it's highly unlikely as you'd already rewrite the entire config line anyway. You can still go back to the old behaviour by setting the strategy to override
either in the app.config.ts
for the config or specifically in the ui
prop.
Everything is explained in #692, I'd recommend reading it.
active
prop to override default behaviour (#732) (8257a11)as
prop (#535) (e404912)tailwind-merge
for app.config
& move config to components & type props (#692) (34d2f57)lodash-es
(#648) (d6476d1)td
and tr
(#741) (874447c)max > 5
and max
equal total pages (#728) (a071e4b)app.config.ts
(a603ea5), closes #655
TabItem
(#671) (15e418e)TabPanel
with tabindex="-1"
(cbb2f28)Full Changelog: https://github.com/nuxt/ui/compare/v2.8.1...v2.9.0
Published by benjamincanac about 1 year ago
getValibotError
to avoid importing safeParseAsync
(#640) (e8daf7f)Full Changelog: https://github.com/nuxt/ui/compare/v2.8.0...v2.8.1
Published by benjamincanac about 1 year ago
NuxtLabs UI is now Nuxt UI, this rebranding involves the transfer of the repository from nuxtlabs
to nuxt
GitHub organization. Both packages are now @nuxt/ui
and @nuxt/ui-edge
, previous @nuxthq
ones will be deprecated.
The documentation has also been moved to https://ui.nuxt.com and got itself a brand new landing page.
https://github.com/nuxt/ui/assets/739984/fc716da0-3b5e-44f6-8c56-3bb2bc769777
tailwind-merge
for class merging (#509)Everything is explained in the PR description, I'd strongly recommend reading it.
icon
prop as fallback (df3b202)icon
default from app.config.ts
(55daed0)orientation
prop (#603) (b3bc6e2)valibot
support (#615) (ab5153a)fullscreen
prop (#523) (7e2bebd)DEFAULT
shade to primary
color (#493) (c6056ed)tailwind-merge
for class merging (#509) (8880bdc)actions
(#507) (b243e8c)justify-end
to wrapper to prevent right align (e578b0d)size
to max avatar (e49c673)label
as number (7c157ce)hover
mode with padding like dropdown (dc951ff)id
for label selection (9b3a22e)gap
values (998314e)v-model
changes (#524) (fdce429)Full Changelog: https://github.com/nuxt/ui/compare/v2.7.0...v2.8.0
Published by benjamincanac about 1 year ago
Alert
componentTabs
componentForm
componentValidate form data using schema libraries such as Yup, Zod, Joi or your own validation logic. It works seamlessly with the FormGroup component to automatically display error messages around form elements.
Badge
component has new variants and colorsLink
component is now documentedWrapper around
<NuxtLink>
using the Vue Routercustom
prop that provides a few extra features
LinkCustom
and add exact-query
/ exact-hash
propsui
prop is now ui-menu
and ui-select
is now ui
(#432)outline
to subtle
+ add soft
variants (5bd5dc2)size
prop and theme options (#391) (d2a8a07)LinkCustom
and add exact-query
/ exact-hash
props (cefe5a7)title
and description
slots (#431) (df455db)value-attribute
prop (#429) (959c968)::selection
(09d0ea2)required
star display (3dd0492)size
default to null (c59595f)exact
prop wasn't working (82e152b), closes #417
disabled
prop (396aae7), closes #473
red
color is safelisted for form elements (208acca), closes #423 #373
toast.add
(2cd6208), closes #375 #440
ui
and ui-select
props (#432) (7cccbcf)Full Changelog: https://github.com/nuxtlabs/ui/compare/v2.6.0...v2.7.0
Published by benjamincanac about 1 year ago
Accordion
component: https://ui.nuxtlabs.com/elements/accordion
Avatar
class
will no longer apply on the wrapper but on the img
so use :ui="{ wrapper: '...' }"
instead because of the v-bind="$attrs"
on the img
tagprevent-close
prop (2cc5c0d), closes #303
prevent-close
prop (d15e816)select
event for the entire row (#353) (d292706)class
customization (5dffa86), closes #366
disabled
state on some variants (41a5238)transition
prop had no effect (db34665)disabled
thumb opacity (c92dc98)appear
on transition (cbe2b1b), closes #400
Full Changelog: https://github.com/nuxtlabs/ui/compare/v2.5.0...v2.6.0
Published by benjamincanac over 1 year ago
Range
component: https://ui.nuxtlabs.com/forms/range
defineShortcuts
composable now supports chained shortcuts: https://ui.nuxtlabs.com/getting-started/shortcuts#defineshortcuts
Radio
/ Checkbox
/ Toggle
Some classes have been extracted from the base
config preset and split into multiple ones to ease the customization like color
, background
, border
, ring
, rounded
, etc.
If you've overridden ui.radio.base
, ui.checkbox.base
or ui.toggle.base
in your app.config.ts
, you might want to take a look at #323.
chipText
(#306) (759af05)color
prop for form elements (#323) (ffb312d)@headlessui/vue
components (41b85d5), closes #315
color
of children (6be9290), closes #352
sort-button
prop (0f3fe0d)opacity-50
when disabled (c2ebb04)color
in config (1b03b8a)Full Changelog: https://github.com/nuxtlabs/ui/compare/v2.4.1...v2.5.0