summit-kit
Version:
A React component library for building modern web applications with an earthy and outdoorsy flair.
24 lines (23 loc) • 1.04 kB
TypeScript
import { FormEventHandler } from 'react';
import { StandardProps } from '../Types/general.ts';
type FormProps = {
onSubmit?: FormEventHandler;
method?: string;
action?: string;
"aria-label"?: string;
"aria-labelledby"?: string;
} & StandardProps;
/**
* Renders a customizable HTML `<form>` element with optional class names, submit handler, method, and action.
*
* @param props - The properties for configuring the form.
* @param props.classes - An optional array of CSS class names to apply to the form.
* @param props.onSubmit - An optional submit event handler. If provided, prevents default form submission and calls this handler.
* @param props.method - An optional HTTP method for the form submission (e.g., "post", "get").
* @param props.action - An optional URL to which the form data will be submitted.
* @param props.children - The form's child elements.
*
* @returns The rendered form element.
*/
export declare const Form: (props: FormProps) => import("react/jsx-runtime").JSX.Element;
export {};