code/tamagui.dev/data/docs/components/form/1.3.0.mdx
<Highlights
features={[
Works on native and web.,
Outputs accessible forms.,
Works with every Tamagui prop.,
]}
/>
Form is already installed in tamagui, or you can install it independently:
npm install @tamagui/form
import { Form } from 'tamagui' // or '@tamagui/form'
export default () => (
<Form>
<Form.Trigger asChild>
<Button />
</Form.Trigger>
</Form>
)
<PropsTable
data={[
{
name: 'onSubmit',
type: '() => void',
required: true,
description: Must use Form.Trigger to ensure onSubmit will callback.,
},
]}
/>
Wrap this around your submitting element to make the form submit. We recommend using asChild to a child element of your choosing for more control.
Accepts Tamagui Props.