slider-usage

Implement Zag.js Slider for bounded numeric input in React apps.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill slider-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slider-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/slider-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill slider-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use after component-usage-ux when an app needs @techsio/ui-kit Slider for single or range numeric adjustment with Zag.js slider behavior, label, markers, value text, orientation, min/max/step, validation status, and token styling.

Core Features & Use Cases

  • Bounded numeric input for both single and range values using a production-ready Slider
  • Supports min, max, step, orientation, showValueText, and optional markers to cue scale
  • Encourages pairing with NumericInput for precise typed entry in forms and dashboards

Quick Start

Create a Slider with min, max, and defaultValue to observe proper bounds and value display.

Frequently Asked Questions about slider-usage

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

FAQPage Schema
How do I implement a bounded numeric slider in React using Zag.js?

To implement a bounded numeric slider in React, use the Zag.js slider component to configure min, max, and step values. It provides production-ready behavior for single or range numeric adjustments within forms.

Can I display value text and scale markers on a React slider component?

Yes, you can display value text and scale markers on a React slider component. The Zag.js implementation exposes props like showValueText and markers to visually cue the scale and current numeric value.

How do I set up a range slider for adjusting min and max numeric values?

Set up a range slider by configuring the Zag.js component to handle both single and range numeric values. You define the min, max, and step properties to establish the bounded adjustment behavior.

Does the Zag.js slider support vertical orientation for numeric input forms?

Yes, the Zag.js slider supports vertical orientation for numeric input forms. You can set the orientation prop to adjust the layout direction alongside min, max, and step configurations.

What is the best way to handle precise typed numeric entry alongside a slider?

The best way to handle precise typed numeric entry is to pair the slider with a NumericInput component. This combination allows users to drag for approximate adjustments and type exact values in dashboards.

Do I need a specific UI kit version to use Zag.js slider styling and props?

Yes, you need to integrate with the @techsio/ui-kit library version 0.3.2 or higher. This ensures proper exposure of slider props, validation status handling, and token-based styling.