You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`before-fields`|| Slot inside [`<UForm>`](https://ui.nuxt.com/components/form) before the list of [`<UFormField>`](https://ui.nuxt.com/components/form-field)|
12
-
|`after-fields`|| Slot inside [`<UForm>`](https://ui.nuxt.com/components/form) after the list of [`<UFormField>`](https://ui.nuxt.com/components/form-field)|
13
-
|`submit`|`{ disabled: boolean }`| Slot for customizing the submit button. `disabled` indicates whether at least one field is invalid. |
14
-
|`<field>`|`{ field: string, state: Ref<Record<string, any> }>`{lang=ts} |**Dynamic** slot for a specific field inside Zod schema. |
|`before-fields`|| Slot inside [`<UForm>`](https://ui.nuxt.com/components/form) before the list of [`<UFormField>`](https://ui.nuxt.com/components/form-field)|
12
+
|`after-fields`|| Slot inside [`<UForm>`](https://ui.nuxt.com/components/form) after the list of [`<UFormField>`](https://ui.nuxt.com/components/form-field)|
13
+
|`submit`|`{ disabled: boolean }`| Slot for customizing the submit button. `disabled` indicates whether at least one field is invalid. |
14
+
|`<field>`|`{ field: string, state: Ref<Record<string, any> }>`{lang=ts} |**Dynamic** input slot for a specific field inside Zod schema. |
15
+
|`<field>-<form field slot>`||**Dynamic** sub-slot for a specific `<UFormField>` inside the form. |
15
16
16
-
### Dynamic slots
17
+
### Dynamic input slots
17
18
18
19
For each field in your Zod schema, `<AutoForm>` generates a dynamic slot.
19
20
You can use these slots to customize the input components for each field.
@@ -52,11 +53,38 @@ const schema = z.object({
52
53
53
54
And if you want to use a custom component for the submit button, you can do it like this:
Beyond dynamic input slots, you can override additional field elements such as `hint` or `description`.
81
+
When the standard [FormField](/customization/fields#formfield-customization) configuration does not provide enough flexibility, use slots to customize these elements.
0 commit comments