Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Custom Inputs
Select
Components
Components
78
Micro Charts
Navigation
Libraries
Content Editor
Data View
Form Builder
Image Designer
Kanban Board
PDF Viewer
Video Player
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Buy License

Form Builder

Form Builder creates schema-driven forms with a drag-and-drop builder, a runtime renderer, and provider-based registration for field types and field-specific settings panels.

Use it for admin-configurable forms, document templates, onboarding builders, tenant-specific field layouts, surveys, intake flows, and other places where product teams need to compose fields without changing Angular templates.

Hidden fields use type: 'hidden'. They render as native input type="hidden" controls in runtime forms, stay editable in the builder inspector, and are included in raw submitted values.

Builder inputs

InputTypeDefault
schema
Two-way model containing the form title, sections, and fields.
ModelSignal<FormBuilderSchema>createDefaultFormBuilderSchema()
paletteTitle
Title shown above the field palette.
stringFields
inspectorTitle
Title shown above the field settings inspector.
stringField properties
uploadCallback
Optional upload handler used by upload and logo-upload fields. Overrides the global provider callback.
FormBuilderUploadCallback | nullundefined

Builder events

EventDescriptionType
fieldSelectedEmitted when a canvas field is selected.FormBuilderFieldChange
fieldAddedEmitted when a field is inserted from the palette.FormBuilderFieldChange
fieldRemovedEmitted when a field is deleted from the canvas.FormBuilderFieldChange

Renderer inputs

InputTypeDefault
schema*
Saved builder schema to render as an Angular reactive form.
FormBuilderSchema
flow
Optional renderer-only presentation flow. When provided, it overrides schema.flow and can set up runtime steps without changing the saved schema.
FormBuilderFlow | nullundefined
items
Optional top-level field and section references to render. Use this with an external stepper to render only the selected step while keeping one renderer form.
FormBuilderLayoutItem[] | nullundefined
value
Two-way model for runtime form values.
Record<string, any>{}
readonly
Disables all controls and hides the submit button when used with showSubmit.
booleanfalse
showSubmit
Whether the renderer shows its built-in submit button.
booleantrue
submitLabel
Text for the built-in submit button.
stringSubmit
uploadCallback
Optional upload handler used by upload and logo-upload fields. Overrides the global provider callback.
FormBuilderUploadCallback | nullundefined

Renderer events

EventDescriptionType
formSubmitEmitted with raw form value when the rendered form is valid and submitted.Record<string, any>
formReadyEmitted after the renderer creates the FormGroup.FormGroup

Provider helpers

HelperDescriptionReturns
provideFormBuilderEnvironment provider for custom items, custom fields, settings components, select data sources, and a global uploadCallback.EnvironmentProviders
provideFormBuilderSelectDataSourceProvider helper for registering one named select data source that can be selected in the built-in select field inspector.Provider
provideFormBuilderSelectDataSourcesProvider helper for registering multiple named select data sources.Provider[]
formBuilderItemHelper for defining a palette item, including layout and static items, before passing it to provideFormBuilder.FormBuilderItemDefinition
provideFormBuilderFieldProvider helper for registering one custom field definition with FORM_BUILDER_FIELDS.Provider
provideFormBuilderFieldsProvider helper for registering multiple custom field definitions with FORM_BUILDER_FIELDS.Provider[]
formBuilderFieldHelper for defining a field type with defaults, lazy renderer, renderer-driven settings schema, inheritance, and validators.FormBuilderFieldDefinition
formBuilderSettingsLegacy helper for registering a settings component for an existing field type. Prefer settings.schema on the field definition.FormBuilderSettingsDefinition

Injection tokens

TokenDescriptionType
FORM_BUILDER_ITEMSMulti provider token for layout, static, or field-like palette items.InjectionToken<FormBuilderItemDefinition[]>
FORM_BUILDER_FIELDSMulti provider token for concrete field definitions available in the palette and renderer.InjectionToken<FormBuilderFieldDefinition[]>
FORM_BUILDER_SETTINGSMulti provider token for legacy settings components keyed by field or item type.InjectionToken<FormBuilderSettingsDefinition[]>
FORM_BUILDER_UPLOAD_CALLBACKGlobal upload handler used when no component-level uploadCallback input is supplied.InjectionToken<FormBuilderUploadCallback>
FORM_BUILDER_SELECT_DATA_SOURCESMulti provider token containing registered select data source definitions.InjectionToken<FormBuilderSelectDataSourceDefinition[]>

FormBuilderSchema

PropertyDescriptionType
titleOptional schema title for your own storage, previews, or surrounding UI.string
fieldsOptional top-level fields that are not inside a section. Layout order is controlled by layout when present.FormBuilderField[]
layoutOptional ordered list of top-level field and section ids. Missing items are appended automatically by the builder and renderer.FormBuilderLayoutItem[]
flowOptional presentation flow. Use mode steps with FormBuilderStep entries to render the same form as a multi-step flow.FormBuilderFlow
sectionsRequired list of sections. A schema may use an empty array when all fields live at the top level.FormBuilderSection[]

FormBuilderFlow

PropertyDescriptionType
modesingle renders the flat layout. steps renders flow.steps through NgStarter Stepper.'single' | 'steps'
stepsOrdered step definitions. Each step references existing top-level fields or sections through items. Can be stored in schema.flow or passed to FormRenderer through its flow input.FormBuilderStep[]

FormBuilderStep

PropertyDescriptionType
idStable step id used by builder canvas, Layers, and drag/drop.string
titleStep label shown in Layers, builder canvas, and the runtime stepper.string
descriptionOptional helper text shown in the builder canvas and renderer.string
optionalMarks the step as optional in the runtime stepper.boolean
itemsOrdered references to top-level fields or sections displayed in this step.FormBuilderLayoutItem[]

FormBuilderField

PropertyDescriptionType
idStable unique id used by drag/drop layout and field selection.string
nameReactive form control name and saved value key. The builder inspector shows the resulting field path for nested fields, for example invoice_items.item_description.string
typeField type matched to a FormBuilderFieldDefinition.string
kindOptional item kind. Defaults to field; layout and static alter rendering and form control creation.FormBuilderItemKind
labelVisible label used by the builder canvas, renderer, and default settings.string
placeholderPlaceholder passed to input-like default renderers.string
hintHelper text shown by supported renderers.string
defaultValueInitial value used when the renderer creates a FormControl.any
multipleEnables multi-value behavior for select and upload-like fields.boolean
clearableEnables clear action for supported select-like controls.boolean
requiredAdds required validation and updates built-in settings state.boolean
disabledCreates the runtime control in a disabled state.boolean
readonlyMarks the field readonly for renderers that support readonly display.boolean
widthGrid width from 1 to 12 columns.FormBuilderFieldWidth
optionsChoice options for select, radio, and other option-based renderers.FormBuilderOption[]
optionsSourceSelect field source mode. Use static for textarea-defined options or dataSource for registered async data sources.'static' | 'dataSource'
dataSourceRegistered select data source id used when optionsSource is dataSource.string
dataSourceOptionsOptional runtime options for a select data source such as page size, search debounce, and minimum search length.FormBuilderSelectDataSourceOptions
validationDeclarative validation rules used when no custom validators factory is supplied.FormBuilderValidationRule[]
settingsCustom configuration bag for renderer-specific and settings-schema values.Record<string, any>
childrenNested child fields for layout containers such as group and repeater.FormBuilderField[]

FormBuilderSelectDataSourceDefinition

PropertyDescriptionType
idStable id saved on FormBuilderField.dataSource.string
nameHuman-readable name shown in the select field inspector.string
dataSourceAsync SelectDataSource function used by the runtime select renderer.SelectDataSource
optionContentComponentOptional Angular component used to render async option rows in form-builder select fields.Type<any>
valueComponentOptional Angular component used to render selected async values in form-builder select fields.Type<any>

FormBuilderSelectDataSourceOptions

PropertyDescriptionType
pageSizeAsync page size passed to the select data source. Form Builder select defaults to 20.number
searchableWhether the runtime select search input is enabled. Form Builder data source selects enable search by default.boolean
searchDebounceDebounce in milliseconds before remote search requests. Defaults to 250.number
minSearchLengthMinimum typed search length before remote search. Form Builder select defaults to 1.number
loadOnOpenWhether to load the first async page when the select opens. Defaults to true.boolean

Built-in field types

TypeDescriptionGroup
textSingle-line text input.Basic
numberNative numeric input rendered with NgStarter field styling.Basic
emailEmail input with built-in email validator support.Basic
hiddenNative input type="hidden" included in raw submitted values.Basic
textareaMulti-line text input.Basic
selectSingle or multiple option selection.Choices
radioRadio group backed by field options.Choices
checkboxBoolean checkbox field.Choices
toggleBoolean slide toggle field.Choices
dateSingle date input.Date and time
timeTime input.Date and time
date-rangeStart and end date input.Date and time
timezone-selectTimezone selector.Date and time
uploadFile upload control with optional upload callback.Files
logo-uploadSingle logo upload control with preview, format settings, max file size, and optional upload callback.Files
currencyNumeric currency amount input.Finance
currency-selectCurrency selector.Finance
country-selectCountry selector.Location
groupLayout container for nested child fields.Layout
repeaterLayout container that renders child fields as a FormArray.Layout
plain-textStatic text block with optional expression-based output.Layout
spacerStatic vertical spacing block.Layout

Field and item definitions

PropertyDescriptionType
typeUnique palette and renderer type. Schema fields use the same value.string
labelPalette label shown to users.string
kindControls whether the item is a form field, layout item, or static block.FormBuilderItemKind
groupPalette group name. Use Layout for layout items.string
iconIcon name shown in the palette.string
descriptionOptional palette helper text.string
defaultsPartial field data applied when the item is inserted into a schema.Partial<FormBuilderField>
rendererLazy component importer for a custom runtime field renderer.FormBuilderComponentImporter
settingsSettings component importer or schema-driven settings configuration.FormBuilderComponentImporter | FormBuilderSettingsConfig
acceptsChildrenAllows nested fields in the builder canvas and renderer.boolean
validatorsCustom validator factory for fields of this type.(field: FormBuilderField) => ValidatorFn[]

Settings inheritance

ValueDescriptionType
fieldBase settings for label, field id, hint, width, required, readonly, and disabled.FormBuilderSettingsInheritance
input-fieldField settings plus placeholder for input-like controls.FormBuilderSettingsInheritance
layoutBase layout settings for label, hint, and width.FormBuilderSettingsInheritance
layout-containerContainer layout settings for label and width.FormBuilderSettingsInheritance
staticStatic block settings for label and width.FormBuilderSettingsInheritance
noneUse only the supplied settings schema.FormBuilderSettingsInheritance