finform-react-builder
Version:
A powerful, flexible React form builder with dynamic field rendering, custom validation, multi-step forms, Material-UI integration, image component support, toggle/radio buttons, switches, autocomplete, and advanced button positioning
34 lines (33 loc) • 1.09 kB
TypeScript
import { default as React } from 'react';
export interface FinRadioOption {
label: string;
value: string | number;
description?: string;
}
export interface FinRadioGroupProps {
/** Optional section heading above the group */
labelText?: string;
/** The inner label for the radio group itself (accessible) */
label?: string;
/** The currently selected value */
value: any;
/** The list of options */
options: FinRadioOption[];
/** Horizontal when true, vertical when false */
row?: boolean;
/** Handles change */
onChange: (val: any) => void;
/** Top heading or none */
labelPosition?: 'top' | 'none';
/** Typography variant for the heading */
labelVariant?: 'caption' | 'body2' | 'subtitle2' | 'h6';
/** Optional helper text under the group */
helperText?: string;
/** Optional error state */
error?: boolean;
/** Group padding multiplier */
groupPadding?: number;
/** Gap between radio options */
itemGap?: number;
}
export declare const FinRadioGroup: React.FC<FinRadioGroupProps>;