FormProps
react-router

FormProps interface

Form props available to navigations

Properties

about

Type: string

acceptCharset

Type: string

accessKey

Type: string

action

Type: string

The URL to submit the form data to. If undefined, this defaults to the closest route in context.

aria-activedescendant

Type: string

Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.

aria-atomic

Type: Booleanish

Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.

aria-autocomplete

Type: "none" | "list" | "inline" | "both"

Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.

aria-braillelabel

Type: string

Defines a string value that labels the current element, which is intended to be converted into Braille.

aria-brailleroledescription

Type: string

Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.

aria-busy

Type: Booleanish

aria-checked

Type: boolean | "true" | "false" | "mixed"

Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.

aria-colcount

Type: number

Defines the total number of columns in a table, grid, or treegrid.

aria-colindex

Type: number

Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.

aria-colindextext

Type: string

Defines a human readable text alternative of aria-colindex.

aria-colspan

Type: number

Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.

aria-controls

Type: string

Identifies the element (or elements) whose contents or presence are controlled by the current element.

aria-current

Type: boolean | "time" | "true" | "location" | "page" | "step" | "false" | "date"

Indicates the element that represents the current item within a container or set of related elements.

aria-describedby

Type: string

Identifies the element (or elements) that describes the object.

aria-description

Type: string

Defines a string value that describes or annotates the current element.

aria-details

Type: string

Identifies the element that provides a detailed, extended description for the object.

aria-disabled

Type: Booleanish

Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

aria-dropeffect

Type: "link" | "copy" | "none" | "execute" | "move" | "popup"

Indicates what functions can be performed when a dragged object is released on the drop target.

aria-errormessage

Type: string

Identifies the element that provides an error message for the object.

aria-expanded

Type: Booleanish

Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.

aria-flowto

Type: string

Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.

aria-grabbed

Type: Booleanish

Indicates an element's "grabbed" state in a drag-and-drop operation.

aria-haspopup

Type: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree"

Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

aria-hidden

Type: Booleanish

Indicates whether the element is exposed to an accessibility API.

aria-invalid

Type: boolean | "true" | "false" | "grammar" | "spelling"

Indicates the entered value does not conform to the format expected by the application.

aria-keyshortcuts

Type: string

Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.

aria-label

Type: string

Defines a string value that labels the current element.

aria-labelledby

Type: string

Identifies the element (or elements) that labels the current element.

aria-level

Type: number

Defines the hierarchical level of an element within a structure.

aria-live

Type: "off" | "assertive" | "polite"

Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.

aria-modal

Type: Booleanish

Indicates whether an element is modal when displayed.

aria-multiline

Type: Booleanish

Indicates whether a text box accepts multiple lines of input or only a single line.

aria-multiselectable

Type: Booleanish

Indicates that the user may select more than one item from the current selectable descendants.

aria-orientation

Type: "horizontal" | "vertical"

Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.

aria-owns

Type: string

Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.

aria-placeholder

Type: string

Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.

aria-posinset

Type: number

Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.

aria-pressed

Type: boolean | "true" | "false" | "mixed"

Indicates the current "pressed" state of toggle buttons.

aria-readonly

Type: Booleanish

Indicates that the element is not editable, but is otherwise operable.

aria-relevant

Type: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"

Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.

aria-required

Type: Booleanish

Indicates that user input is required on the element before a form may be submitted.

aria-roledescription

Type: string

Defines a human-readable, author-localized description for the role of an element.

aria-rowcount

Type: number

Defines the total number of rows in a table, grid, or treegrid.

aria-rowindex

Type: number

Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.

aria-rowindextext

Type: string

Defines a human readable text alternative of aria-rowindex.

aria-rowspan

Type: number

Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.

aria-selected

Type: Booleanish

Indicates the current "selected" state of various widgets.

aria-setsize

Type: number

Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.

aria-sort

Type: "none" | "ascending" | "descending" | "other"

Indicates if items in a table or grid are sorted in ascending or descending order.

aria-valuemax

Type: number

Defines the maximum allowed value for a range widget.

aria-valuemin

Type: number

Defines the minimum allowed value for a range widget.

aria-valuenow

Type: number

Defines the current value for a range widget.

aria-valuetext

Type: string

Defines the human readable text alternative of aria-valuenow for a range widget.

autoCapitalize

Type: string

autoComplete

Type: string

autoCorrect

Type: string

autoFocus

Type: boolean

autoSave

Type: string

children

Type: ReactNode

className

Type: string

color

Type: string

content

Type: string

contentEditable

Type: "inherit" | Booleanish

contextMenu

Type: string

dangerouslySetInnerHTML

Type: { __html: string | TrustedHTML, }

datatype

Type: string

defaultChecked

Type: boolean

defaultValue

Type: string | number | readonly string[]

dir

Type: string

discover

Type: DiscoverBehavior

draggable

Type: Booleanish

encType

Type: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"

The encoding type to use for the form submission.

fetcherKey

Type: string

Indicates a specific fetcherKey to use when using navigate={false} so you can pick up the fetcher's state in a different component in a useFetcher.

hidden

Type: boolean

id

Type: string

inlist

Type: any

inputMode

Type: "search" | "text" | "url" | "none" | "tel" | "email" | "numeric" | "decimal"

Hints at the type of data that might be entered by the user while editing the element or its contents

is

Type: string

Specify that a standard HTML element should behave like a defined custom built-in element

itemID

Type: string

itemProp

Type: string

itemRef

Type: string

itemScope

Type: boolean

itemType

Type: string

lang

Type: string

method

Type: HTMLFormMethod

The HTTP verb to use when the form is submitted. Supports "get", "post", "put", "delete", and "patch".

Native <form> only supports get and post, avoid the other verbs if you'd like to support progressive enhancement

name

Type: string

Type: boolean

Skips the navigation and uses a fetcher internally when false. This is essentially a shorthand for useFetcher() + <fetcher.Form> where you don't care about the resulting data in this component.

noValidate

Type: boolean

nonce

Type: string

onAbort

Type: ReactEventHandler<HTMLFormElement>

onAbortCapture

Type: ReactEventHandler<HTMLFormElement>

onAnimationEnd

Type: AnimationEventHandler<HTMLFormElement>

onAnimationEndCapture

Type: AnimationEventHandler<HTMLFormElement>

onAnimationIteration

Type: AnimationEventHandler<HTMLFormElement>

onAnimationIterationCapture

Type: AnimationEventHandler<HTMLFormElement>

onAnimationStart

Type: AnimationEventHandler<HTMLFormElement>

onAnimationStartCapture

Type: AnimationEventHandler<HTMLFormElement>

onAuxClick

Type: MouseEventHandler<HTMLFormElement>

onAuxClickCapture

Type: MouseEventHandler<HTMLFormElement>

onBeforeInput

Type: FormEventHandler<HTMLFormElement>

onBeforeInputCapture

Type: FormEventHandler<HTMLFormElement>

onBlur

Type: FocusEventHandler<HTMLFormElement>

onBlurCapture

Type: FocusEventHandler<HTMLFormElement>

onCanPlay

Type: ReactEventHandler<HTMLFormElement>

onCanPlayCapture

Type: ReactEventHandler<HTMLFormElement>

onCanPlayThrough

Type: ReactEventHandler<HTMLFormElement>

onCanPlayThroughCapture

Type: ReactEventHandler<HTMLFormElement>

onChange

Type: FormEventHandler<HTMLFormElement>

onChangeCapture

Type: FormEventHandler<HTMLFormElement>

onClick

Type: MouseEventHandler<HTMLFormElement>

onClickCapture

Type: MouseEventHandler<HTMLFormElement>

onCompositionEnd

Type: CompositionEventHandler<HTMLFormElement>

onCompositionEndCapture

Type: CompositionEventHandler<HTMLFormElement>

onCompositionStart

Type: CompositionEventHandler<HTMLFormElement>

onCompositionStartCapture

Type: CompositionEventHandler<HTMLFormElement>

onCompositionUpdate

Type: CompositionEventHandler<HTMLFormElement>

onCompositionUpdateCapture

Type: CompositionEventHandler<HTMLFormElement>

onContextMenu

Type: MouseEventHandler<HTMLFormElement>

onContextMenuCapture

Type: MouseEventHandler<HTMLFormElement>

onCopy

Type: ClipboardEventHandler<HTMLFormElement>

onCopyCapture

Type: ClipboardEventHandler<HTMLFormElement>

onCut

Type: ClipboardEventHandler<HTMLFormElement>

onCutCapture

Type: ClipboardEventHandler<HTMLFormElement>

onDoubleClick

Type: MouseEventHandler<HTMLFormElement>

onDoubleClickCapture

Type: MouseEventHandler<HTMLFormElement>

onDrag

Type: DragEventHandler<HTMLFormElement>

onDragCapture

Type: DragEventHandler<HTMLFormElement>

onDragEnd

Type: DragEventHandler<HTMLFormElement>

onDragEndCapture

Type: DragEventHandler<HTMLFormElement>

onDragEnter

Type: DragEventHandler<HTMLFormElement>

onDragEnterCapture

Type: DragEventHandler<HTMLFormElement>

onDragExit

Type: DragEventHandler<HTMLFormElement>

onDragExitCapture

Type: DragEventHandler<HTMLFormElement>

onDragLeave

Type: DragEventHandler<HTMLFormElement>

onDragLeaveCapture

Type: DragEventHandler<HTMLFormElement>

onDragOver

Type: DragEventHandler<HTMLFormElement>

onDragOverCapture

Type: DragEventHandler<HTMLFormElement>

onDragStart

Type: DragEventHandler<HTMLFormElement>

onDragStartCapture

Type: DragEventHandler<HTMLFormElement>

onDrop

Type: DragEventHandler<HTMLFormElement>

onDropCapture

Type: DragEventHandler<HTMLFormElement>

onDurationChange

Type: ReactEventHandler<HTMLFormElement>

onDurationChangeCapture

Type: ReactEventHandler<HTMLFormElement>

onEmptied

Type: ReactEventHandler<HTMLFormElement>

onEmptiedCapture

Type: ReactEventHandler<HTMLFormElement>

onEncrypted

Type: ReactEventHandler<HTMLFormElement>

onEncryptedCapture

Type: ReactEventHandler<HTMLFormElement>

onEnded

Type: ReactEventHandler<HTMLFormElement>

onEndedCapture

Type: ReactEventHandler<HTMLFormElement>

onError

Type: ReactEventHandler<HTMLFormElement>

onErrorCapture

Type: ReactEventHandler<HTMLFormElement>

onFocus

Type: FocusEventHandler<HTMLFormElement>

onFocusCapture

Type: FocusEventHandler<HTMLFormElement>

onGotPointerCapture

Type: PointerEventHandler<HTMLFormElement>

onGotPointerCaptureCapture

Type: PointerEventHandler<HTMLFormElement>

onInput

Type: FormEventHandler<HTMLFormElement>

onInputCapture

Type: FormEventHandler<HTMLFormElement>

onInvalid

Type: FormEventHandler<HTMLFormElement>

onInvalidCapture

Type: FormEventHandler<HTMLFormElement>

onKeyDown

Type: KeyboardEventHandler<HTMLFormElement>

onKeyDownCapture

Type: KeyboardEventHandler<HTMLFormElement>

onKeyPress

Type: KeyboardEventHandler<HTMLFormElement>

onKeyPressCapture

Type: KeyboardEventHandler<HTMLFormElement>

onKeyUp

Type: KeyboardEventHandler<HTMLFormElement>

onKeyUpCapture

Type: KeyboardEventHandler<HTMLFormElement>

onLoad

Type: ReactEventHandler<HTMLFormElement>

onLoadCapture

Type: ReactEventHandler<HTMLFormElement>

onLoadStart

Type: ReactEventHandler<HTMLFormElement>

onLoadStartCapture

Type: ReactEventHandler<HTMLFormElement>

onLoadedData

Type: ReactEventHandler<HTMLFormElement>

onLoadedDataCapture

Type: ReactEventHandler<HTMLFormElement>

onLoadedMetadata

Type: ReactEventHandler<HTMLFormElement>

onLoadedMetadataCapture

Type: ReactEventHandler<HTMLFormElement>

onLostPointerCapture

Type: PointerEventHandler<HTMLFormElement>

onLostPointerCaptureCapture

Type: PointerEventHandler<HTMLFormElement>

onMouseDown

Type: MouseEventHandler<HTMLFormElement>

onMouseDownCapture

Type: MouseEventHandler<HTMLFormElement>

onMouseEnter

Type: MouseEventHandler<HTMLFormElement>

onMouseLeave

Type: MouseEventHandler<HTMLFormElement>

onMouseMove

Type: MouseEventHandler<HTMLFormElement>

onMouseMoveCapture

Type: MouseEventHandler<HTMLFormElement>

onMouseOut

Type: MouseEventHandler<HTMLFormElement>

onMouseOutCapture

Type: MouseEventHandler<HTMLFormElement>

onMouseOver

Type: MouseEventHandler<HTMLFormElement>

onMouseOverCapture

Type: MouseEventHandler<HTMLFormElement>

onMouseUp

Type: MouseEventHandler<HTMLFormElement>

onMouseUpCapture

Type: MouseEventHandler<HTMLFormElement>

onPaste

Type: ClipboardEventHandler<HTMLFormElement>

onPasteCapture

Type: ClipboardEventHandler<HTMLFormElement>

onPause

Type: ReactEventHandler<HTMLFormElement>

onPauseCapture

Type: ReactEventHandler<HTMLFormElement>

onPlay

Type: ReactEventHandler<HTMLFormElement>

onPlayCapture

Type: ReactEventHandler<HTMLFormElement>

onPlaying

Type: ReactEventHandler<HTMLFormElement>

onPlayingCapture

Type: ReactEventHandler<HTMLFormElement>

onPointerCancel

Type: PointerEventHandler<HTMLFormElement>

onPointerCancelCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerDown

Type: PointerEventHandler<HTMLFormElement>

onPointerDownCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerEnter

Type: PointerEventHandler<HTMLFormElement>

onPointerEnterCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerLeave

Type: PointerEventHandler<HTMLFormElement>

onPointerLeaveCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerMove

Type: PointerEventHandler<HTMLFormElement>

onPointerMoveCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerOut

Type: PointerEventHandler<HTMLFormElement>

onPointerOutCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerOver

Type: PointerEventHandler<HTMLFormElement>

onPointerOverCapture

Type: PointerEventHandler<HTMLFormElement>

onPointerUp

Type: PointerEventHandler<HTMLFormElement>

onPointerUpCapture

Type: PointerEventHandler<HTMLFormElement>

onProgress

Type: ReactEventHandler<HTMLFormElement>

onProgressCapture

Type: ReactEventHandler<HTMLFormElement>

onRateChange

Type: ReactEventHandler<HTMLFormElement>

onRateChangeCapture

Type: ReactEventHandler<HTMLFormElement>

onReset

Type: FormEventHandler<HTMLFormElement>

onResetCapture

Type: FormEventHandler<HTMLFormElement>

onResize

Type: ReactEventHandler<HTMLFormElement>

onResizeCapture

Type: ReactEventHandler<HTMLFormElement>

onScroll

Type: UIEventHandler<HTMLFormElement>

onScrollCapture

Type: UIEventHandler<HTMLFormElement>

onSeeked

Type: ReactEventHandler<HTMLFormElement>

onSeekedCapture

Type: ReactEventHandler<HTMLFormElement>

onSeeking

Type: ReactEventHandler<HTMLFormElement>

onSeekingCapture

Type: ReactEventHandler<HTMLFormElement>

onSelect

Type: ReactEventHandler<HTMLFormElement>

onSelectCapture

Type: ReactEventHandler<HTMLFormElement>

onStalled

Type: ReactEventHandler<HTMLFormElement>

onStalledCapture

Type: ReactEventHandler<HTMLFormElement>

onSubmit

Type: FormEventHandler<HTMLFormElement>

A function to call when the form is submitted. If you call event.preventDefault() then this form will not do anything.

onSubmitCapture

Type: FormEventHandler<HTMLFormElement>

onSuspend

Type: ReactEventHandler<HTMLFormElement>

onSuspendCapture

Type: ReactEventHandler<HTMLFormElement>

onTimeUpdate

Type: ReactEventHandler<HTMLFormElement>

onTimeUpdateCapture

Type: ReactEventHandler<HTMLFormElement>

onTouchCancel

Type: TouchEventHandler<HTMLFormElement>

onTouchCancelCapture

Type: TouchEventHandler<HTMLFormElement>

onTouchEnd

Type: TouchEventHandler<HTMLFormElement>

onTouchEndCapture

Type: TouchEventHandler<HTMLFormElement>

onTouchMove

Type: TouchEventHandler<HTMLFormElement>

onTouchMoveCapture

Type: TouchEventHandler<HTMLFormElement>

onTouchStart

Type: TouchEventHandler<HTMLFormElement>

onTouchStartCapture

Type: TouchEventHandler<HTMLFormElement>

onTransitionEnd

Type: TransitionEventHandler<HTMLFormElement>

onTransitionEndCapture

Type: TransitionEventHandler<HTMLFormElement>

onVolumeChange

Type: ReactEventHandler<HTMLFormElement>

onVolumeChangeCapture

Type: ReactEventHandler<HTMLFormElement>

onWaiting

Type: ReactEventHandler<HTMLFormElement>

onWaitingCapture

Type: ReactEventHandler<HTMLFormElement>

onWheel

Type: WheelEventHandler<HTMLFormElement>

onWheelCapture

Type: WheelEventHandler<HTMLFormElement>

placeholder

Type: string

prefix

Type: string

preventScrollReset

Type: boolean

Prevent the scroll position from resetting to the top of the viewport on completion of the navigation when using the component

property

Type: string

radioGroup

Type: string

rel

Type: string

relative

Type: RelativeRoutingType

Determines whether the form action is relative to the route hierarchy or the pathname. Use this if you want to opt out of navigating the route hierarchy and want to instead route based on /-delimited URL segments

reloadDocument

Type: boolean

Forces a full document navigation instead of client side routing + data fetch.

replace

Type: boolean

Replaces the current entry in the browser history stack when the form navigates. Use this if you don't want the user to be able to click "back" to the page with the form on it.

resource

Type: string

results

Type: number

rev

Type: string

role

Type: AriaRole

security

Type: string

slot

Type: string

spellCheck

Type: Booleanish

state

Type: any

State object to add to the history stack entry for this navigation

style

Type: CSSProperties

suppressContentEditableWarning

Type: boolean

suppressHydrationWarning

Type: boolean

tabIndex

Type: number

target

Type: string

title

Type: string

translate

Type: "yes" | "no"

typeof

Type: string

unselectable

Type: "on" | "off"

viewTransition

Type: boolean

Enables a View Transition for this navigation. To apply specific styles during the transition see useViewTransitionState.

vocab

Type: string

Docs and examples CC 4.0