Skip to main content
Version: v1 (Current)

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 commit fc6bfb108634735f1657e533206c3f8702ad357d; 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'

Repository source

Props​

NameTypeRequired / defaultDescription
sectionsFormSectionDef[]Required—
layoutFormLayout | undefined"stack"—
submitLabelstring | undefined"Submit"—
backLabelstring | undefined"Back"—
showBackboolean | undefinedfalseShow a Back button next to Submit (stack/cards/tabs/accordion layouts).
showActionsboolean | undefinedtrueHide the built-in action row entirely.
initialValuesRecord<string, unknown> | undefined—Values merged over the defaults derived from element definitions.
layoutPropsRecord<string, unknown> | undefined—Extra props for the layout component (e.g. defaultTab, defaultOpen).

Events​

NameTypeRequired / defaultDescription
back[]——
submit[values: Record<string, unknown>]——
update:values[values: Record<string, unknown>]——

Slots​

NameTypeRequired / defaultDescription
actions{ submit: (e?: Event | undefined) => Promise<void | undefined>; back: () => void; isSubmitting: boolean; }——

Exposed methods and values​

NameTypeRequired / defaultDescription
formFormContext<{ [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'),
}