Skip to content

Multifield

This component generates a multifield to be used in the author dialog. It allows for multiple entries of a specified field type. The multifield’s value is passed to the component as a prop.

Properties

PropertyTypeDescriptionDefault ValueRequired
labelstringThe label of the multifield componentYes
childrenobjectThe children item schemaYes
itemLabelKeystringKey to use for labeling each itemNo
tooltipstringTooltip text for the multifieldNo
requiredbooleanWhether the multifield is requiredfalseNo

Example

To use a multifield component in the author dialog, we can use the following code:

{
banners: multifield({
label: 'Banners',
children: object({
title: text({
label: 'Title',
placeholder: 'Title'
}),
link: pathbrowser({
label: 'Link',
placeholder: 'Link',
defaultValue: "/content/default-value"
})
})
})
}

Example in author dialog

Multifield Component Multifield Component