FormProps
Native form props with action and method defined for router handling.
Compatibility
ReactAvailable in this renderer's browser integration.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactAvailable in this renderer's browser integration.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
Import from @kasperrt/smolter/react @kasperrt/smolter/preact
Signature
interface FormProps
extends Omit<FormHTMLAttributes<HTMLFormElement>, "action" | "method">,
RouteFormOptions {}Usage
Native form props with action and method defined for router handling. method is lowercase and supports get/post/put/patch/delete. Submitter attributes can override action and method. Use uppercase only for imperative submit options.
<Form action="/tasks/search" method="get">
<input name="q" />
<button>Search</button>
</Form>