Form Renderer
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
FormRenderer
import { FormRenderer } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
sections | FormSectionDef[] | Required | — |
layout | FormLayout | undefined | "stack" | — |
submitLabel | string | undefined | "Submit" | — |
backLabel | string | undefined | "Back" | — |
showBack | boolean | undefined | false | Show a Back button next to Submit (stack/cards/tabs/accordion layouts). |
showActions | boolean | undefined | true | Hide the built-in action row entirely. |
initialValues | Record<string, unknown> | undefined | — | Values merged over the defaults derived from element definitions. |
layoutProps | Record<string, unknown> | undefined | — | Extra props for the layout component (e.g. defaultTab, defaultOpen). |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
back | [] | — | — |
submit | [values: Record<string, unknown>] | — | — |
update:values | [values: Record<string, unknown>] | — | — |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
actions | { submit: (e?: Event | undefined) => Promise<void | undefined>; back: () => void; isSubmitting: boolean; } | — | — |
Exposed methods and values
| Name | Type | Required / default | Description |
|---|---|---|---|
form | FormContext<{ [x: string]: unknown; }, { [x: string]: unknown; }> | — | — |
validate | (opts?: Partial<ValidationOptions> | undefined) => Promise<FormValidationResult<{ [x: string]: unknown; }, { [x: string]: unknown; }>> | — | — |
resetForm | (state?: Partial<FormState<{ [x: string]: unknown; }>> | undefined, opts?: Partial<ResetFormOpts> | undefined) => void | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Stack
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { FormRenderer } from '.'
import type { FormSectionDef } from '../types'
const defaultArgs = {
sections: registrationSections,
}
{
render: () => renderWithResult('stack'),
}
Cards
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { FormRenderer } from '.'
import type { FormSectionDef } from '../types'
const defaultArgs = {
sections: registrationSections,
}
{
render: () => renderWithResult('cards'),
}
TabbedForm
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { FormRenderer } from '.'
import type { FormSectionDef } from '../types'
const defaultArgs = {
sections: registrationSections,
}
{
name: 'Tabs',
render: () => renderWithResult('tabs'),
}