Releases: nuxt/ui
v2.9.0
Read our updated documentation on https://ui.nuxt.com
✨ Highlights
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 theui
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.
🚀 Features
- FormGroup: add slots (#714) (2fc9385)
- Link: add
active
prop to override default behaviour (#732) (8257a11) - Link: add
as
prop (#535) (e404912) - module: use
tailwind-merge
forapp.config
& move config to components & type props (#692) (34d2f57) - module: remove
lodash-es
(#648) (d6476d1) - Table: add ability to custom style for
td
andtr
(#741) (874447c)
🐛 Bug Fixes
- Accordion: close other items in circular order (#735) (6887f73)
- FormGroup: use explicit label instead of implicit label (#638) (681f0e5)
- Pagination: handle
max > 5
andmax
equal total pages (#728) (a071e4b) - Range: fix track pseudo-elements for mozilla (#636) (8955595)
- SelectMenu: handle numbers (0544a01), closes #574
- Table: add missing classes in
app.config.ts
(a603ea5), closes #655 - Table: select all rows without select listener (#652) (83d609d)
- Tabs: add visible focus indicator on active tabs (#690) (be734fc)
- Tabs: allow custom keys in
TabItem
(#671) (15e418e) - Tabs: prevent focus of
TabPanel
withtabindex="-1"
(cbb2f28)
👋 New Contributors
- @farnabaz made their first contribution in #664
- @Sma11X made their first contribution in #652
- @iBobik made their first contribution in #671
- @Flowko made their first contribution in #648
- @HigherOrderLogic made their first contribution in #690
- @Levy-from-Odessa made their first contribution in #714
Full Changelog: v2.8.1...v2.9.0
v2.8.1
🐛 Bug Fixes
- Form: fix
getValibotError
to avoid importingsafeParseAsync
(#640) (e8daf7f) - Form: fix valibot imports (#617) (1a7eb27)
- Pagination: page numbers not clickable (#624) (c1e0654)
👋 New Contributors
- @LemonAppleMo made their first contribution in #624
- @jduartea made their first contribution in #640
Full Changelog: v2.8.0...v2.8.1
v2.8.0
✨ Highlights
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.
nuxtlabs-ui-to-nuxt-ui.mp4
🚨 Breaking Changes
- use
tailwind-merge
for class merging (#509)
Everything is explained in the PR description, I'd strongly recommend reading it.
🚀 Features
- Avatar: add
icon
prop as fallback (df3b202) - Avatar: handle
icon
default fromapp.config.ts
(55daed0) - ButtonGroup: add
orientation
prop (#603) (b3bc6e2) - Form: add
valibot
support (#615) (ab5153a) - Form: improve form control and input validation trigger (#487) (6d7973f)
- Modal: add
fullscreen
prop (#523) (7e2bebd) - module: add
DEFAULT
shade toprimary
color (#493) (c6056ed) - module: use
tailwind-merge
for class merging (#509) (8880bdc) - Table: support nested keys in columns (#503) (858886a)
- Tabs: control selected index (#490) (aaf09ad)
🐛 Bug Fixes
- Alert: fix wrong type of
actions
(#507) (b243e8c) - AvatarGroup: add
justify-end
to wrapper to prevent right align (e578b0d) - AvatarGroup: pass default
size
to max avatar (e49c673) - Badge: allow
label
as number (7c157ce) - Button: add missing prop types (#508) (a8a1c15)
- Form: use safeParseAsync for zod (#497) (8b19b18)
- Popover: handle
hover
mode with padding like dropdown (dc951ff) - Radio: put back
id
for label selection (9b3a22e) - SelectMenu: invalid
gap
values (998314e) - Table: empty state is displayed if null (#517) (44ba758)
- Table: missing component imports (#608) (d936316)
- Tabs: recompute marker position when
v-model
changes (#524) (fdce429) - Tooltip: hide on touch devices (#580) (f1ed007)
Full Changelog: v2.7.0...v2.8.0
v2.7.0
✨ Highlights
- New
Alert
component
- New
Tabs
component
- New
Form
component
Validate 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 colors
Link
component is now documented
Wrapper around
<NuxtLink>
using the Vue Routercustom
prop that provides a few extra features
🚨 Breaking Changes
- Link: renamed from
LinkCustom
and addexact-query
/exact-hash
props - Badge: add colors and variants (solid has changed)
- SelectMenu:
ui
prop is nowui-menu
andui-select
is nowui
(#432)
🚀 Features
- Alert: new component (#449) (ab2abae)
- Badge: add colors and variants (solid has changed) (05503e5)
- Badge: rename
outline
tosubtle
+ addsoft
variants (5bd5dc2) - CommandPalette: bind active and selected to scoped slot (#441) (b0440f8)
- FormGroup: add
size
prop and theme options (#391) (d2a8a07) - Form: new component (#439) (a3aba1a)
- Link: rename from
LinkCustom
and addexact-query
/exact-hash
props (cefe5a7) - Notification: support html with
title
anddescription
slots (#431) (df455db) - Range: increase narrowed surface (#459) (3b183ac)
- SelectMenu: add
value-attribute
prop (#429) (959c968) - Tabs: new component (#450) (8298b62)
- ui: apply primary bg on
::selection
(09d0ea2)
🐛 Bug Fixes
- FormGroup:
required
star display (3dd0492) - FormGroup: err when no prop defined (93aebe6)
- FormGroup: set
size
default to null (c59595f) - Form: return state on validate (#472) (248b0a6)
- LinkCustom:
exact
prop wasn't working (82e152b), closes #417 - LinkCustom: improve prop binding and prevent error with externals (914d156)
- Link: handle
disabled
prop (396aae7), closes #473 - module: ensure
red
color is safelisted for form elements (208acca), closes #423 #373 - module: omit colors defined as strings (927b63f)
- module: safelist all colors for
toast.add
(2cd6208), closes #375 #440 - module: smart safelisting for components in snake case (e25be11), closes #461
- Popover: hover mode (#453) (10890e6)
- SelectMenu: invert
ui
andui-select
props (#432) (7cccbcf) - Table: hide data when loading state is active (#460) (2b3dc8d)
👋 New Contributors
- @KeJunMao made their first contribution in #441
- @henrycunh made their first contribution in #391
- @MadDog4533 made their first contribution in #382
- @larrasu made their first contribution in #452
- @ItzExotical made their first contribution in #467
- @romhml made their first contribution in #439
Full Changelog: v2.6.0...v2.7.0
v2.6.0
✨ Highlights
- New
Accordion
component: https://ui.nuxtlabs.com/elements/accordion
🚨 Breaking Changes
Avatar
class
will no longer apply on the wrapper but on theimg
so use:ui="{ wrapper: '...' }"
instead because of thev-bind="$attrs"
on theimg
tag
🚀 Features
- Accordion: new component (#301) (e50f377)
- Avatar: bind component attributes to img element (#421) (773a23f)
- SelectMenu: handle async search (#426) (5f8fe85)
- Modal: add
prevent-close
prop (2cc5c0d), closes #303 - Slideover: add
prevent-close
prop (d15e816) - Table: add
select
event for the entire row (#353) (d292706) - Table: allow columns
class
customization (5dffa86), closes #366
🐛 Bug Fixes
- ButtonGroup: err when no props on buttons (80a9738), closes #360
- Button: missing
disabled
state on some variants (41a5238) - Modal: disabling
transition
prop had no effect (db34665) - Range:
disabled
thumb opacity (c92dc98) - Range: progress style (#385) (a79c165)
- SelectMenu: missing
appear
on transition (cbe2b1b), closes #400 - Table: fixed row deletion bug on deselect (#425) (46b444a)
👋 New Contributors
- @hylarucoder made their first contribution in #385
- @DavidDeSloovere made their first contribution in #407
- @rambii made their first contribution in #422
- @salazarr-js made their first contribution in #411
- @sduduzog made their first contribution in #421
- @johnpuaoi made their first contribution in #425
- @mcastagnetti made their first contribution in #426
Full Changelog: v2.5.0...v2.6.0
v2.5.0
✨ Highlights
- New
Range
component: https://ui.nuxtlabs.com/forms/range defineShortcuts
composable now supports chained shortcuts: https://ui.nuxtlabs.com/getting-started/shortcuts#defineshortcuts- Support for LTR and RTL languages: https://ui.nuxtlabs.com/getting-started/examples#rtl-support
🚨 Breaking Changes
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.
🚀 Features
- Avatar: handle
chipText
(#306) (759af05) - defineShortcuts: chained shortcuts (#282) (a67f691)
- Radio/Checkbox/Toggle: handle
color
prop for form elements (#323) (ffb312d) - Range: new component (#290) (97a1c86)
- RTL support (#320) (4ea114a)
- Table: pass row index to table cell (#291) (71c2465)
- Table: reset sort on third click (1ff11ac), closes #300
🐛 Bug Fixes
- components: prefix
@headlessui/vue
components (41b85d5), closes #315 - FormGroup: prevent overriding
color
of children (6be9290), closes #352 - Table: missing default sort icon when overriding
sort-button
prop (0f3fe0d) - Toggle: add
opacity-50
when disabled (c2ebb04) - Tooltip: add
color
in config (1b03b8a)
👋 New Contributors
- @jaybharadia made their first contribution in #306
Full Changelog: v2.4.1...v2.5.0
v2.4.1
🐛 Bug Fixes
- forms: precise type assertion for
onInput
event handler (#293) (457b7a9) - module: let
tailwindcss
viewer enabled by default (4023fbe), closes #292 - module: safelist aliases for input (f719111)
- module: safelist regex when a
:
was present before color (f7e2082) - Radio/Checkbox: remove legacy
custom
(3bac087)
Full Changelog: v2.4.0...v2.4.1
v2.4.0
✨ Highlights
- New
Pagination
component: https://ui.nuxtlabs.com/navigation/pagination - CSS bundle greatly reduced with smart safelisting: https://ui.nuxtlabs.com/getting-started/theming#colors
🚨 Breaking Changes
Select
text-attribute
prop has been renamed tooption-attribute
and now defaults tolabel
(likeSelectMenu
)
Input
/ Textarea
/ Radio
/ Checkbox
/ Select
/ SelectMenu
ui.custom
has been removed in favor of class binding throughv-bind="$attrs"
class
will no longer apply on the wrapper but on the element so use:ui="{ wrapper: '...' }"
instead
If you were using some form elements outside the library components, for example a basic
<input type="checkbox" />
in your prose, you might loose some reset styles as@tailwindcss/forms
now only applies when usingform-${element}
classes, see #278.
🚀 What's Changed
- fix(forms): padded prop with p-0 class
- fix(Button): same size when no label + uniformize form elements
- fix(ButtonGroup): invalid size validator
- fix(ButtonGroup): use
-space-x-px
on wrapper - chore(Dropdown): handle height for overflow
- chore: add @tailwindcss/container-queries official plugin
- fix(Notification): class priority for icon color
- feat(Table): add slot for empty state by @Haythamasalama in #260
- feat(Pagination): new component by @smarroufin in #257
- feat(Table): add loading state by @Haythamasalama in #259
- fix(module): use
@tailwindcss/forms
class strategy by @benjamincanac in #278 - fix(Toggle): missing disabled prop
- fix(Radio/Checkbox): split preset as indeterminate is checkbox only
- chore(Select)!: rename
text-attribute
tooption-attribute
and def… - feat(CommandPalette): handle
empty-state
by @Haythamasalama in #271 - fix(forms)!: bind
$attrs
to elements by @benjamincanac in #279 - feat(module): smart safelisting by @benjamincanac in #268
- fix(Table): colspan of
empty
andloading
is wrong when selection enabled by @9uenther in #284
New Contributors
Full Changelog: v2.3.0...v2.4.0
v2.3.0
✨ Highlights
- New
Table
component: https://ui.nuxtlabs.com/data/table
🚨 Breaking Changes
Toggle
icon-on
/icon-off
props have been renamed toon-icon
/off-icon
ui.toggle.default.iconOn
/ui.toggle.default.iconOff
have been renamed toui.toggle.default. onIcon
/ui.toggle.default.offIcon
in preset
CommandPalette
close
prop has been renamed toclose-button
ui.commandPalette.default.close
has been renamed toui.commandPalette.default.closeButton
in presetempty
prop has been renamed toempty-state
ui.commandPalette.default.empty
has been renamed toui.commandPalette.default.emptyState
in preset
Notification
close
prop has been renamed toclose-button
ui.notification.default.close
has been renamed toui.notification.default.closeButton
in presetui.notification.default.action
has been renamed toui.notification.default. actionButton
in preset
Input
pointer-events-none
class has been moved fromui.input.icon.leading.wrapper
/ui.input.icon.trailing.wrapper
toui.input.icon.leading.pointer
/ui.input.icon.trailing.pointer
in preset
SelectMenu
inline-flex
class has been removed from wrapper so it might cause some alignment issues
🚀 What's Changed
- chore(Toggle): improve component display
- chore(SelectMenu): handle
multiple
default display - fix(Button): invalid padding when using
square
prop - chore(Toggle)!: rename icons to
onIcon
/offIcon
for consistency - chore(CommandPalette)!: rename props to
emptyState
andcloseButton
for consistency - chore(Notification)!: rename to
closeButton
andactionButton
for consistency - feat: add
Table
component by @benjamincanac in #237 - chore(Dropdown):
hover
mode with padding instead of offset by @smarroufin in #242 - chore(SelectMenu)!: remove
inline-flex
from wrapper to behave like other form elements - chore: uniformize icons in
Button
/Input
/Select
/SelectMenu
+loading
state inSelect
/SelectMenu
- chore: add
leading
andtrailing
slots inButton
/Input
/Select
/SelectMenu
- fix(defineShortcuts): err with input autocomplete that triggers
keydown
events - chore(Input)!: move pointer class inside its own preset class
- chore(Badge): handle
color
override like buttons - fix(Avatar): placeholder font size
- fix(Table): override of
sortButton
andemptyState
props - fix(CommandPalette): override of
closeButton
andemptyState
props - fix: use
cloneVNode
when altering props in render functions
New Contributors
Full Changelog: v2.2.1...v2.3.0
v2.2.1
What's Changed
- fix(FormGroup): missing h import from vue
- chore(forms): remove required on Input, Select and Textarea name
Full Changelog: v2.2.0...v2.2.1