SliderField
SliderField allows selecting values by dragging a handle along a track with marks and step increments.
Props & Configuration
5 propsComplete property specifications, parameter types, and default fallbacks.
| Property | Type | Default | Description |
|---|---|---|---|
| idRequired | string | — | Form state key name. |
| controlRequired | Control<any> | — | React Hook Form control instance. |
| label | string | — | Field label. |
| min | number | 0 | Minimum value. |
| max | number | 100 | Maximum value. |
Interactive Examples & Live Previews
1 DemosEvery example includes its own live, interactive preview element alongside the corresponding copyable TypeScript snippet.
Basic Slider
Slider with min/max values.
1import React from "react";2import { useForm } from "react-hook-form";3import { SliderField } from "antd-dynamic-ui";45export default function BasicSlider() {6 const { control } = useForm({ defaultValues: { score: 75 } });7 return (8 <div className="max-w-md">9 <SliderField id="score" control={control} label="Performance Score" min={0} max={100} />10 </div>11 );12}
Frequently Asked Questions & Quick Solutions
Architectural patterns, React 19 compatibility, and integration tips for SliderField.
How does SliderField integrate with Ant Design 5.x and Next.js 15?▼
SliderField is designed as an enhanced, declarative wrapper for Ant Design. It fully supports Next.js 15 App Router when using @ant-design/nextjs-registry, eliminating SSR hydration mismatches and guaranteeing 0ms layout thrashing.
Can I customize validation, themes, and props for SliderField?▼
Yes. Every prop is fully typed in TypeScript 5 with comprehensive Intellisense. You can pass custom styling via className or style props, configure global Ant Design themes via ConfigProvider, and extend validation logic seamlessly.