n-slider

Expose a Vue 3 n-slider component with v-model binding for range and single-value selection.

8|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-slider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-slider
Source: https://github.com/jiaiyan/naive-ui-skills/tree/main/components/n-slider
Command: npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-slider

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Slider controls enable precise value selection in UI, replacing manual numeric inputs with an intuitive interface and improving accessibility.

Core Features & Use Cases

  • Supports single-value and range selection for input forms, filters, and dashboards.
  • Provides marks for quick reference and a vertical orientation for space-constrained layouts.
  • Includes a customizable handle and compatibility with Naive UI components such as inputs and cards.

Quick Start

Import the n-slider component and bind its value to a reactive state to start using it in your form.

Frequently Asked Questions about n-slider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a range slider to a Vue 3 form using Naive UI?

You can implement a range slider in Vue 3 by binding a reactive array to the component's v-model property. This enables dual-handle selection for filtering minimum and maximum values across forms and dashboards.

Can I display marks on a Naive UI slider for quick value reference?

Yes, the component supports rendering marks along the track for quick reference. This allows users to visually identify and snap to predefined values during precise input selection in forms and filters.

Does the n-slider component support vertical orientation for space-constrained layouts?

Yes, the component supports vertical orientation for space-constrained layouts. You can switch the slider to a vertical layout to fit dashboards or sidebars where horizontal space is strictly limited.

What is the best way to bind slider values to reactive state in Vue 3?

The best approach is using v-model to establish two-way binding between the slider handle and your reactive variable. This ensures immediate state updates as users drag the handle to fine-tune values.

When should I use a slider instead of a numeric input in a dashboard?

Use a slider instead of a numeric input when intuitive adjustment is needed. Sliders replace manual typing with a visual drag interface, improving accessibility for volume or price controls in dashboards.