FormSubmitButton

A FormSubmitButton handles form submission, and listen's to react-hook-form's state to handle disabled * pending states appropriately.

Examples

With Custom Label

Props

intent
Intent
isDestructive
boolean
isIcon
boolean
slotLeft
SlotNode
slotRight
SlotNode
variant
"primary" | "secondary" | "tertiary"
form
string
formAction
string
formEncType
string
formMethod
string
formNoValidate
boolean
formTarget
string
name
string
value
string
isPending
boolean
id
string
type
"button" | "submit" | "reset"'button'
onFocus
((e: FocusEvent<Element, Element>) => void)
onBlur
((e: FocusEvent<Element, Element>) => void)
onKeyDown
((e: KeyboardEvent) => void)
onKeyUp
((e: KeyboardEvent) => void)
onClick
((e: MouseEvent<FocusableElement, MouseEvent>) => void)
isDisabled
boolean
onPress
((e: PressEvent) => void)
onPressStart
((e: PressEvent) => void)
onPressEnd
((e: PressEvent) => void)
onPressChange
((isPressed: boolean) => void)
onPressUp
((e: PressEvent) => void)
autoFocus
boolean
onFocusChange
((isFocused: boolean) => void)
preventFocusOnPress
boolean
excludeFromTabOrder
boolean
onHoverStart
((e: HoverEvent) => void)
onHoverEnd
((e: HoverEvent) => void)
onHoverChange
((isHovering: boolean) => void)
slot
string | null
children
ReactNode | ((values: ButtonRenderProps & { defaultChildren: ReactNode; }) => ReactNode)
className
string | ((values: ButtonRenderProps & { defaultClassName: string; }) => string)
style
CSSProperties | ((values: ButtonRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)
ref
ForwardedRef<HTMLButtonElement>