diff --git a/www/docs/docs/usage/complex-fields.md b/www/docs/docs/usage/complex-fields.md index 5d55c18..9a41b0f 100644 --- a/www/docs/docs/usage/complex-fields.md +++ b/www/docs/docs/usage/complex-fields.md @@ -55,12 +55,6 @@ const FormSchema = z.object({ }); ``` -

This allows you to build stuff like this when your designer decides to go crazy:

- -

- -

- ## ⚠️ When to use ⚠️ Complex input types are useful when you have reusable input components that have a non-primitive object as its form state. If you only need to build a custom layout, use the [Custom Layouts](./custom-layouts.md) feature of this package. diff --git a/www/docs/docs/usage/form-components.md b/www/docs/docs/usage/form-components.md index eacf3ef..3a1b446 100644 --- a/www/docs/docs/usage/form-components.md +++ b/www/docs/docs/usage/form-components.md @@ -1,10 +1,6 @@ ---- -sidebar_position: 7 ---- - # Form Components -## Customizing form components +## Props By default your form is just rendered with a `
` tag. You can pass props to it via `formProps`: @@ -16,7 +12,9 @@ By default your form is just rendered with a `` tag. You can pass props to /> ``` -You can also provide a custom form component as the second parameter to `createTsForm` options if you want, it will get passed an `onSubmit` function, and it should also render its children some where: +## Custom Form Component + +The recommended approach is to provide a custom form component as the second parameter to `createTsForm` options, it will get passed an `onSubmit` function, and it should also render its children (these are your input components): ```tsx const mapping = [