Skip to content

Slider emits number[] for a single thumb when using plain v-model #6889

Description

@Waradu

Environment

Operating system macOS 25.6.0
CPU Apple M4 Pro (14 cores)
Node.js version v24.11.1
nuxt/cli version 3.37.0
Package manager bun@1.4.0
Nuxt version 4.5.2
Nitro version 2.13.4
Builder vite@8.2.2
Config css, modules
Modules @nuxt/ui@4.11.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.11.0

Reproduction

https://github.com/waradu/nuxt-ui-slider-poc (or just look at the description code snippet)

Description

A single-thumb USlider emits a one-element array instead of a number when using plain v-model.

<script setup>
const value = ref(25)
</script>

<template>
  <USlider v-model="value" />
  <pre>{{ value }} / array: {{ Array.isArray(value) }}</pre>
</template>

After moving the slider:

  • Actual: value becomes [71]
  • Expected: value remains 71

Using v-model.number="value" masks the problem by coercing [71] to 71, but this should not be necessary.

This worked correctly with Nuxt UI 4.10.0.

Image Image

Additional context

One potentially related change in v4.11.0 is PR #6848 (commit d6c3802), which modified Slider attribute forwarding.

Logs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageAwaiting initial review and prioritization

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions