UNPKG

smartstepper

Version:

SmartStepper is a modern, customizable React stepper component for building multi-step forms, wizards, and onboarding flows. Integrates with react-hook-form, supports Yup/Zod validation, and offers a flexible, config-driven API for dynamic forms.

27 lines (26 loc) 1.25 kB
import { useController, UseControllerProps } from 'react-hook-form'; /** * Custom hook to access the SmartStepper context. * * Provides navigation methods, form field registration, and control object for the stepper form. * * @returns {ISmartStepperContextValue<FieldValues>} The SmartStepper context value. * @see ISmartStepperContextValue */ export declare const useSmartStepper: () => import("./_types").ISmartStepperContextValue<import("react-hook-form").FieldValues>; /** * Custom hook to create a react-hook-form controller bound to the SmartStepper's form control. * * This hook automatically injects the SmartStepper's control object, so you only need to provide the remaining controller props. * * @param {Omit<UseControllerProps, 'control'>} props - Controller props excluding the control object. * @returns {ReturnType<typeof useController>} The controller object for the field. * @see useController */ export declare const useSmartStepperController: (props: Omit<UseControllerProps, 'control'>) => import("react-hook-form").UseControllerReturn<import("react-hook-form").FieldValues, string>; /** * Re-export of react-hook-form's useController for advanced use cases. * * @see useController */ export { useController };