# Angular FormRenderer Component

FormRenderer builds a form from a plain JSON schema: every control of the library inside a FormField, validation with built-in and custom validators, declarative conditions, sections, columns, steps and repeatable groups, on top of Reactive Forms.

## Basic

FormRenderer builds a form from a schema , a plain JSON object you can store, version and send from a server. Every field is a control of the library inside a FormField, with its label, hint and errors. The value is bound with [(value)] , and onSubmit only fires when the form is valid: otherwise every field is marked as touched, an error summary lists the problems and the focus moves to the first invalid field.

```typescript
import { Component, signal } from '@angular/core';
import { FormRendererModule, FormRendererValue, FormSchema } from '@exhaustive-ui/core/formrenderer';

@Component({
    template: `
        <div class="card flex flex-col gap-4">
            <p-form-renderer [schema]="schema" [(value)]="value" [headingLevel]="3" (onSubmit)="submitted.set($event.value)" />
            @if (submitted()) {
                <pre class="text-sm font-mono m-0 p-3 rounded-border bg-surface-100 dark:bg-surface-800 overflow-auto">{{ json(submitted()) }}</pre>
            }
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule]
})
export class FormrendererBasicDemo {
    schema: FormSchema = {
        version: 1,
        title: 'Contact us',
        columns: 2,
        fields: [
            { key: 'firstName', type: 'text', label: 'First name', required: true },
            { key: 'lastName', type: 'text', label: 'Last name', required: true },
            { key: 'email', type: 'email', label: 'Email', required: true, hint: 'We reply within a day.', colSpan: 2 },
            { key: 'topic', type: 'select', label: 'Topic', options: ['Sales', 'Support', 'Billing'], required: true },
            { key: 'urgent', type: 'toggle', label: 'Urgent' },
            { key: 'message', type: 'textarea', label: 'Message', minLength: 10, colSpan: 2 }
        ],
        submitLabel: 'Send'
    };

    value: FormRendererValue = { topic: 'Support' };

    submitted = signal<FormRendererValue | null>(null);

    json(value: unknown) {
        return JSON.stringify(value, null, 2);
    }
}
```

## Schema Reference

A schema has a version , always 1 for now, an optional title and description , and its fields in one of three layouts: fields , sections or steps . A field has a unique key , the name of its value, and a type . Where it costs nothing the names follow JSON Schema: default , minimum , maximum , minLength , maxLength , pattern , minItems , maxItems and readOnly . The options of a choice are strings, numbers or {{ '{' }} label, value, disabled {{ '}' }} objects, or an {{ '{' }} loader {{ '}' }} source for options that come from an async loader. Settings specific to a control, such as rows , stars , showTime , presets , mode and currency , go in props . An unknown type falls back to a text input, so a schema written for a newer version still renders.

```typescript
import { Component } from '@angular/core';
import { FormRendererModule, FormRendererValue, FormSchema } from '@exhaustive-ui/core/formrenderer';

@Component({
    template: `
        <div class="doc-tablewrapper mb-6" tabindex="0">
            <table class="doc-table">
                <thead>
                    <tr>
                        <th>Type</th>
                        <th>Control</th>
                        <th>Value</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><i>text</i>, <i>email</i>, <i>password</i></td>
                        <td>InputText, Password</td>
                        <td>string</td>
                    </tr>
                    <tr>
                        <td><i>number</i></td>
                        <td>InputNumber</td>
                        <td>number</td>
                    </tr>
                    <tr>
                        <td><i>textarea</i></td>
                        <td>Textarea</td>
                        <td>string</td>
                    </tr>
                    <tr>
                        <td><i>select</i>, <i>multiselect</i></td>
                        <td>Select, MultiSelect</td>
                        <td>value, array of values</td>
                    </tr>
                    <tr>
                        <td><i>radio</i></td>
                        <td>RadioButton group</td>
                        <td>value</td>
                    </tr>
                    <tr>
                        <td><i>checkbox</i>, <i>toggle</i></td>
                        <td>Checkbox, ToggleSwitch</td>
                        <td>boolean</td>
                    </tr>
                    <tr>
                        <td><i>date</i>, <i>daterange</i>, <i>time</i></td>
                        <td>DatePicker, with presets for ranges</td>
                        <td>Date, [Date, Date], Date</td>
                    </tr>
                    <tr>
                        <td><i>color</i>, <i>rating</i>, <i>slider</i></td>
                        <td>ColorPicker, Rating, Slider</td>
                        <td>string, number, number</td>
                    </tr>
                    <tr>
                        <td><i>otp</i>, <i>phone</i>, <i>file</i></td>
                        <td>InputOtp, PhoneInput, FileInput</td>
                        <td>string, string, File or File[]</td>
                    </tr>
                    <tr>
                        <td><i>group</i></td>
                        <td>A fieldset of sub-fields</td>
                        <td>object</td>
                    </tr>
                    <tr>
                        <td><i>array</i></td>
                        <td>A repeatable group of sub-fields</td>
                        <td>array of objects</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="card">
            <p-form-renderer [schema]="schema" [(value)]="value" [headingLevel]="3" [showActions]="false" ariaLabel="Every field type" />
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule]
})
export class FormrendererSchemaDemo {
    value: FormRendererValue = {};

    schema: FormSchema = {
        version: 1,
        columns: 2,
        fields: [
            { key: 'name', type: 'text', label: 'Text', placeholder: 'Your name' },
            { key: 'email', type: 'email', label: 'Email' },
            { key: 'password', type: 'password', label: 'Password', props: { feedback: false, toggleMask: true } },
            { key: 'budget', type: 'number', label: 'Number', props: { mode: 'currency', currency: 'EUR' } },
            { key: 'plan', type: 'select', label: 'Select', options: ['Free', 'Team', 'Enterprise'] },
            { key: 'tags', type: 'multiselect', label: 'MultiSelect', options: ['Angular', 'Design', 'Forms'] },
            { key: 'size', type: 'radio', label: 'Radio', options: ['S', 'M', 'L'], default: 'M' },
            { key: 'terms', type: 'checkbox', label: 'Accept the terms' },
            { key: 'notify', type: 'toggle', label: 'Notifications', default: true },
            { key: 'birthday', type: 'date', label: 'Date' },
            { key: 'stay', type: 'daterange', label: 'Date range', props: { presets: true } },
            { key: 'alarm', type: 'time', label: 'Time' },
            { key: 'color', type: 'color', label: 'Color', default: '6466f1' },
            { key: 'score', type: 'rating', label: 'Rating', props: { stars: 5 } },
            { key: 'volume', type: 'slider', label: 'Slider', default: 40 },
            { key: 'code', type: 'otp', label: 'One-time code', props: { length: 4 } },
            { key: 'phone', type: 'phone', label: 'Phone', props: { defaultCountry: 'FR' } },
            { key: 'cv', type: 'file', label: 'File' },
            { key: 'bio', type: 'textarea', label: 'Textarea', colSpan: 2, props: { rows: 3 } }
        ]
    };
}
```

## Validation

required , minimum , maximum , minLength , maxLength , pattern , minItems and maxItems become validators, and the email type checks the address. equals names another field whose value this one must repeat, such as a password confirmation. Custom validators are referenced by name in validators , with optional params and message , and registered with the validators input or once for the application with provideFormRendererValidators . A validator returns null when the value is valid, or a message. The messages come from the locale texts of FormField, so a translation applies to every form; messages replaces them for one field, with {{ '{' }}param{{ '}' }} placeholders.

```typescript
import { Component } from '@angular/core';
import { FormRendererModule, FormRendererValidatorFn } from '@exhaustive-ui/core/formrenderer';

@Component({
    template: `
        <div class="card">
            <p-form-renderer [schema]="schema" [validators]="validators" [headingLevel]="3" ariaLabel="Create an account" />
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule]
})
export class FormrendererValidationDemo {
    validators: Record<string, FormRendererValidatorFn> = {
        even: (value) => (value == null || value % 2 === 0 ? null : 'Enter an even number.')
    };
}
```

## Conditions

visibleWhen , disabledWhen and requiredWhen are declarative conditions in the format of FilterBuilder: groups joined by AND or OR, holding rules with a field , an operator and a value . They are plain JSON like the rest of the schema, and FormBuilder edits them with a FilterBuilder. A hidden field is removed from the value and from the validation, a disabled one keeps its value out of the validation. Inside a group or a repeatable group, a condition can test the fields of the same item by their key.

```typescript
import { Component } from '@angular/core';
import { FormRendererModule, FormRendererValue, FormSchema } from '@exhaustive-ui/core/formrenderer';

@Component({
    template: `
        <div class="card">
            <p-form-renderer [schema]="schema" [(value)]="value" [headingLevel]="3" ariaLabel="Delivery" />
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule]
})
export class FormrendererConditionsDemo {
    value: FormRendererValue = {};

    schema: FormSchema = {
        version: 1,
        fields: [
            { key: 'contact', type: 'radio', label: 'Contact me by', options: ['Email', 'Phone'], default: 'Email', props: { inline: true } },
            { key: 'email', type: 'email', label: 'Email', requiredWhen: { logic: 'and', filters: [{ field: 'contact', operator: 'equals', value: 'Email' }] } },
            { key: 'phone', type: 'phone', label: 'Phone', visibleWhen: { logic: 'and', filters: [{ field: 'contact', operator: 'equals', value: 'Phone' }] }, required: true },
            { key: 'business', type: 'checkbox', label: 'I order for a company' },
            { key: 'company', type: 'text', label: 'Company', required: true, visibleWhen: { logic: 'and', filters: [{ field: 'business', operator: 'equals', value: true }] } },
            { key: 'gift', type: 'toggle', label: 'Gift wrapping' },
            { key: 'note', type: 'textarea', label: 'Gift note', disabledWhen: { logic: 'and', filters: [{ field: 'gift', operator: 'equals', value: false }] } }
        ]
    };
}
```

## Layout and Steps

sections group the fields in fieldsets with a legend and a description, and steps split the sections over a Stepper: Next validates the current step before moving on, and submitting from the last step validates them all and opens the first one with an error. columns sets the grid of the form or of a section and colSpan the width of a field; the grid becomes a single column when its container is narrow. A group nests its sub-fields under its key, and an array repeats them, with buttons to add and remove items, minItems and maxItems , and the props.itemLabel of an item, such as Guest {{ '{' }}0{{ '}' }} .

```typescript
import { Component } from '@angular/core';
import { FormRendererModule, FormSchema } from '@exhaustive-ui/core/formrenderer';

@Component({
    template: `
        <div class="card">
            <p-form-renderer [schema]="schema" [headingLevel]="3" [showReset]="true" />
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule]
})
export class FormrendererLayoutDemo {
    schema: FormSchema = {
        version: 1,
        title: 'Book a table',
        steps: [
            {
                id: 'party',
                title: 'Party',
                sections: [
                    {
                        id: 'when',
                        title: 'When',
                        columns: 2,
                        fields: [
                            { key: 'date', type: 'date', label: 'Date', required: true },
                            { key: 'time', type: 'time', label: 'Time', required: true }
                        ]
                    },
                    {
                        id: 'guests',
                        title: 'Guests',
                        description: 'Up to six guests.',
                        fields: [
                            {
                                key: 'guests',
                                type: 'array',
                                label: 'Guests',
                                minItems: 1,
                                maxItems: 6,
                                props: { itemLabel: 'Guest {0}', columns: 2 },
                                fields: [
                                    { key: 'name', type: 'text', label: 'Name', required: true },
                                    { key: 'diet', type: 'select', label: 'Diet', options: ['None', 'Vegetarian', 'Vegan', 'Gluten free'] }
                                ]
                            }
                        ]
                    }
                ]
            },
            {
                id: 'contact',
                title: 'Contact',
                sections: [
                    {
                        id: 'details',
                        columns: 2,
                        fields: [
                            { key: 'name', type: 'text', label: 'Name', required: true },
                            { key: 'phone', type: 'phone', label: 'Phone', required: true },
                            {
                                key: 'address',
                                type: 'group',
                                label: 'Billing address',
                                colSpan: 2,
                                props: { columns: 2 },
                                fields: [
                                    { key: 'street', type: 'text', label: 'Street', colSpan: 2 },
                                    { key: 'city', type: 'text', label: 'City' },
                                    { key: 'zip', type: 'text', label: 'Postal code' }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        submitLabel: 'Book'
    };
}
```

## Custom Fields

A pFormRendererField template renders the fields of a type of your own, or replaces a built-in type. It receives the field as its implicit value and the control , a FormControl, along with the id to give to the control so the label and the error summary point to it, and its invalid , disabled , readonly and required states. The template is rendered inside the FormField of the field, which keeps showing its label, hint and errors. Options from an async source come from loaders , by the name in options.loader ; with dependsOn they reload when another field changes.

```typescript
import { Component } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FormRendererModule, FormSchema } from '@exhaustive-ui/core/formrenderer';
import { InputTextModule } from '@exhaustive-ui/core/inputtext';

@Component({
    template: `
        <div class="card">
            <p-form-renderer [schema]="schema" [loaders]="loaders" [headingLevel]="3" ariaLabel="Shipping">
                <ng-template pFormRendererField="signature" let-field let-control="control" let-id="id" let-invalid="invalid">
                    <input pInputText [id]="id" [formControl]="control" [invalid]="invalid" class="w-full font-serif italic text-xl" autocomplete="name" />
                </ng-template>
            </p-form-renderer>
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule, ReactiveFormsModule, InputTextModule]
})
export class FormrendererCustomfieldsDemo {
    schema: FormSchema = {
        version: 1,
        columns: 2,
        fields: [
            { key: 'country', type: 'select', label: 'Country', options: ['France', 'Germany', 'Italy'], required: true },
            { key: 'city', type: 'select', label: 'City', options: { loader: 'cities', dependsOn: ['country'] }, required: true },
            { key: 'signature', type: 'signature', label: 'Signature', hint: 'Type your full name.', required: true, colSpan: 2 }
        ],
        submitLabel: 'Sign'
    };

    loaders = {
        cities: ({ depends }: { depends: Record<string, any> }) =>
            new Promise<string[]>((resolve) => setTimeout(() => resolve(({ France: ['Lyon', 'Paris'], Germany: ['Berlin', 'Hamburg'], Italy: ['Milan', 'Rome'] } as Record<string, string[]>)[depends['country']] ?? []), 300))
    };
}
```

## Forms Integration

FormRenderer is built on Reactive Forms: each field is a FormControl, a group a FormGroup and a repeatable group a FormArray, so conditions can enable and disable controls and items can be added at runtime. Pass your own FormGroup with form to read its state, patch it or combine it with other controls; FormRenderer adds the controls of the schema to it. It is also available as the formGroup signal. labelVariant sets the label variant of every FormField, and disabled and readonly apply to the whole form.

```typescript
import { Component, signal } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { ButtonModule } from '@exhaustive-ui/core/button';
import { FormRendererModule, FormSchema } from '@exhaustive-ui/core/formrenderer';
import { SelectButtonModule } from '@exhaustive-ui/core/selectbutton';

@Component({
    template: `
        <div class="card flex flex-col gap-4">
            <div class="flex flex-wrap gap-4 items-center">
                <span id="fr-variant" class="font-medium">Label variant</span>
                <p-select-button [options]="variants" [(ngModel)]="variant" ariaLabelledBy="fr-variant" />
                <p-button label="Fill" severity="secondary" (onClick)="fill()" />
                <p-button label="Toggle readonly" severity="secondary" (onClick)="readonly.set(!readonly())" />
            </div>
            <p-form-renderer
                [schema]="schema"
                [form]="form"
                [labelVariant]="variant"
                [readonly]="readonly()"
                [showReset]="true"
                [headingLevel]="3"
                ariaLabel="Profile"
                (onSubmit)="status.set('Saved')"
                (onInvalidSubmit)="status.set($event.errors.length + ' errors')"
            />
            <p class="m-0" aria-live="polite">Status: {{ form.status }}{{ status() ? ', ' + status() : '' }}</p>
        </div>
    `,
    standalone: true,
    imports: [FormRendererModule, ButtonModule, SelectButtonModule, FormsModule]
})
export class FormrendererFormsDemo {
    form = new FormGroup({});

    variants = ['top', 'over', 'on', 'in', 'ifta'];

    variant: any = 'on';

    readonly = signal(false);

    status = signal('');

    schema: FormSchema = {
        version: 1,
        columns: 2,
        fields: [
            { key: 'firstName', type: 'text', label: 'First name', required: true },
            { key: 'lastName', type: 'text', label: 'Last name', required: true },
            { key: 'role', type: 'select', label: 'Role', options: ['Designer', 'Developer', 'Manager'] },
            { key: 'start', type: 'date', label: 'Start date' }
        ],
        submitLabel: 'Save'
    };

    fill() {
        this.form.patchValue({ firstName: 'Ada', lastName: 'Lovelace', role: 'Developer' });
    }
}
```

## Accessibility

Screen Reader FormRenderer renders a native form named by ariaLabel or by its title, whose level is set by headingLevel . Every field gets the label, hint and errors of FormField, linked with aria-describedby , and aria-required and aria-invalid on its control. Sections, groups, radio groups and the items of a repeatable group are fieldsets with a legend. When a submit fails, an error summary with the alert role lists the errors as links to their fields, and the focus moves to the first invalid field. Steps are a Stepper whose current step is announced; moving to another step, adding or removing an item and resetting the form are announced by a polite live region. Every text is translated with the formRenderer key of the locale texts or replaced with the labels input.

## Form Renderer

FormRenderer renders a form from a plain JSON schema with the controls of the library, each inside a FormField: labels, hints and localized error messages, validation, conditional fields, sections, columns, steps and repeatable groups.
The form state is a Reactive Forms FormGroup, built from the schema; the value is bound with  `[(value)]` .

### Props

| Name | Type | Default | Description |
|------|------|---------|-------------|
| dt | Object | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
| pt | FormRendererPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
| schema | FormSchema | { version: 1, fields: [] } | The schema of the form. |
| value | FormRendererValue | - | The value of the form, by field key, bound two-way. Hidden fields are left out of it. |
| form | FormGroup<any> | - | A FormGroup to fill with the controls of the schema, for an application that works with Reactive Forms; the renderer owns its controls. Without it, the renderer creates its own FormGroup, read with  `formGroup()` . |
| labelVariant | FormFieldVariant | - | Where the labels go, as the  `variant`  of FormField: above the control, or inside it ( `over` ,  `in` ,  `on` ,  `ifta` ). |
| layout | "vertical" \| "horizontal" | 'vertical' | Position of the labels: above the controls, or beside them. |
| labelWidth | string | - | Width of the labels in the horizontal layout, any CSS length. |
| size | "small" \| "large" | - | Size of the controls and the texts. |
| requiredIndicator | FormFieldRequiredIndicator | 'asterisk' | How the labels mark the required fields. |
| showErrors | FormFieldShowErrors | 'touched' | When the errors of a field are shown, before the form is submitted. |
| disabled | boolean | false | Whether every field is disabled. |
| readonly | boolean | false | Whether every field is read-only; the controls without a read-only mode are disabled. |
| validators | Record<string, FormRendererValidatorFn> | - | Custom validators by name, merged with the ones of provideFormRendererValidators. |
| loaders | Record<string, FormRendererLoaderFn> | - | Options loaders by name, merged with the ones of provideFormRendererLoaders. |
| errorSummary | boolean | true | Whether an invalid submit shows the list of the errors above the form, each linked to its field. |
| showActions | boolean | true | Whether the buttons of the form are shown: submit, and back and next in a multi-step form. |
| showReset | boolean | false | Whether a reset button is shown. |
| embedded | boolean | false | Whether the renderer is part of a form of the application: it renders no form element, and the submit button calls  `submit()` . |
| headingLevel | number | 2 | Level of the heading of the title; the steps and the error summary are one level below. |
| dateFormat | string | - | Format of the dates, such as  `dd/mm/yy` ; the locale format when not set. |
| appendTo | any | - | Target element to attach the overlays to,  `'body'`  or  `'self'` . |
| ariaLabel | string | - | Accessible name of the form when the schema has no title. |
| labels | Partial<FormRendererLabels> | - | Texts of the component, merged with the translation ( `formRenderer` ) and the English defaults. |
| formGroup | WritableSignal<FormGroup<any>> | signal<FormGroup>(new FormGroup({})) | The FormGroup of the form: the one given with  `form` , or the one built by the renderer. |

### Emits

| Name | Parameters | Description |
|------|------------|-------------|
| onSubmit | event: FormRendererSubmitEvent | Callback to invoke on submit, when the form is valid. |
| onInvalidSubmit | event: FormRendererInvalidSubmitEvent | Callback to invoke on submit, when the form is invalid. |
| onReset | value: void | Callback to invoke when the form is reset. |
| onStepChange | event: FormRendererStepChangeEvent | Callback to invoke when another step is shown. |

### Methods

| Name | Parameters | Return Type | Description |
|------|------------|-------------|-------------|
| submit |  | void | Validates the form and emits onSubmit with its value when it is valid; otherwise marks every field as touched, shows the errors and moves the focus to the first invalid field. |
| reset | value: FormRendererValue | void | Resets the form to the defaults of the schema, or to a value, and goes back to the first step. |
| next |  | void | Goes to the next step when the fields of the current step are valid; otherwise shows their errors. |
| previous |  | void | Goes to the previous step. |
| validateStep | index: number | void | Whether the visible fields of a step are valid; marks them as touched and shows their errors when they are not. |
| focusField | path: string | void | Moves the focus to a field, by its path, showing its step first. |
| addItem | path: string, value: FormRendererValue | void | Adds an item to a repeatable group, by its path, and moves the focus to its first field. |
| removeItem | path: string, index: number | void | Removes an item of a repeatable group, by the path of the group and its index; the focus moves to the next item, or to the add button. |

## Pass Through Options

| Name | Type | Description |
|------|------|-------------|
| host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
| root | PassThroughOption<HTMLElement, I> | Used to pass attributes to the root's DOM element. |
| form | PassThroughOption<HTMLElement, I> | Used to pass attributes to the form element, or the element that replaces it when the renderer is embedded. |
| title | PassThroughOption<HTMLHeadingElement, I> | Used to pass attributes to the title of the form. |
| description | PassThroughOption<HTMLParagraphElement, I> | Used to pass attributes to the description of the form. |
| errorSummary | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the error summary. |
| errorSummaryTitle | PassThroughOption<HTMLHeadingElement, I> | Used to pass attributes to the title of the error summary. |
| errorSummaryList | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the list of the error summary. |
| pcStepper | StepperPassThrough | Used to pass attributes to the Stepper of a multi-step form. |
| section | PassThroughOption<HTMLFieldSetElement, I> | Used to pass attributes to the fieldset of each section. |
| legend | PassThroughOption<HTMLLegendElement, I> | Used to pass attributes to the legend of each section, group and repeatable group. |
| sectionDescription | PassThroughOption<HTMLParagraphElement, I> | Used to pass attributes to the description of each section. |
| grid | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the grid of fields of each section and group. |
| field | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the cell of each field in the grid. |
| pcFormField | FormFieldPassThrough | Used to pass attributes to the FormField of each field. |
| group | PassThroughOption<HTMLFieldSetElement, I> | Used to pass attributes to the fieldset of each group and repeatable group. |
| arrayItem | PassThroughOption<HTMLFieldSetElement, I> | Used to pass attributes to the fieldset of each item of a repeatable group. |
| groupError | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the error message of a repeatable group. |
| arrayButton | ButtonPassThrough | Used to pass attributes to the buttons that add and remove the items of a repeatable group. |
| actions | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the container of the buttons of the form. |
| actionButton | ButtonPassThrough | Used to pass attributes to the buttons of the form: submit, reset, back and next. |
| liveRegion | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the live region. |

## Theming

### CSS Classes

| Class | Description |
|-------|-------------|
| p-formrenderer | Class name of the root element |
| p-formrenderer-form | Class name of the form element |
| p-formrenderer-title | Class name of the title |
| p-formrenderer-description | Class name of the description |
| p-formrenderer-error-summary | Class name of the error summary |
| p-formrenderer-error-summary-title | Class name of the title of the error summary |
| p-formrenderer-error-summary-list | Class name of the list of the error summary |
| p-formrenderer-step-title | Class name of the title of a step |
| p-formrenderer-section | Class name of a section with a title |
| p-formrenderer-section-plain | Class name of a section without a title |
| p-formrenderer-legend | Class name of a legend |
| p-formrenderer-grid | Class name of the grid of fields |
| p-formrenderer-field | Class name of the cell of a field |
| p-formrenderer-group | Class name of a group and a repeatable group |
| p-formrenderer-array-item | Class name of an item of a repeatable group |
| p-formrenderer-group-error | Class name of the error of a repeatable group |
| p-formrenderer-options | Class name of the options of a radio field |
| p-formrenderer-actions | Class name of the container of the buttons |

### Design Tokens

| Token | CSS Variable | Description |
|-------|--------------|-------------|
| formrenderer.root.color | --p-formrenderer-root-color | Text color of root |
| formrenderer.root.gap | --p-formrenderer-root-gap | Gap between the parts of the form |
| formrenderer.title.font.size | --p-formrenderer-title-font-size | Font size of the title |
| formrenderer.title.font.weight | --p-formrenderer-title-font-weight | Font weight of the title |
| formrenderer.description.color | --p-formrenderer-description-color | Color of the description |
| formrenderer.section.background | --p-formrenderer-section-background | Background of a section |
| formrenderer.section.border.color | --p-formrenderer-section-border-color | Border color of a section |
| formrenderer.section.border.radius | --p-formrenderer-section-border-radius | Border radius of a section |
| formrenderer.section.padding | --p-formrenderer-section-padding | Padding of a section |
| formrenderer.legend.padding | --p-formrenderer-legend-padding | Padding of a legend |
| formrenderer.legend.font.size | --p-formrenderer-legend-font-size | Font size of a legend |
| formrenderer.legend.font.weight | --p-formrenderer-legend-font-weight | Font weight of a legend |
| formrenderer.legend.color | --p-formrenderer-legend-color | Color of a legend |
| formrenderer.grid.column.gap | --p-formrenderer-grid-column-gap | Gap between the columns of the grid |
| formrenderer.grid.row.gap | --p-formrenderer-grid-row-gap | Gap between the rows of the grid |
| formrenderer.array.item.background | --p-formrenderer-array-item-background | Background of an item of a repeatable group |
| formrenderer.array.item.border.color | --p-formrenderer-array-item-border-color | Border color of an item of a repeatable group |
| formrenderer.array.item.border.radius | --p-formrenderer-array-item-border-radius | Border radius of an item of a repeatable group |
| formrenderer.array.item.padding | --p-formrenderer-array-item-padding | Padding of an item of a repeatable group |
| formrenderer.option.gap | --p-formrenderer-option-gap | Gap between the options of a radio field and beside a checkbox |
| formrenderer.error.color | --p-formrenderer-error-color | Color of the errors of a repeatable group and of the required marker |
| formrenderer.error.font.size | --p-formrenderer-error-font-size | Font size of the errors of a repeatable group |
| formrenderer.error.summary.background | --p-formrenderer-error-summary-background | Background of the error summary |
| formrenderer.error.summary.border.color | --p-formrenderer-error-summary-border-color | Border color of the error summary |
| formrenderer.error.summary.border.radius | --p-formrenderer-error-summary-border-radius | Border radius of the error summary |
| formrenderer.error.summary.color | --p-formrenderer-error-summary-color | Text color of the error summary |
| formrenderer.error.summary.padding | --p-formrenderer-error-summary-padding | Padding of the error summary |
| formrenderer.actions.gap | --p-formrenderer-actions-gap | Gap between the buttons of the form |

