apps/design-system/content/docs/fragments/single-value-field-array.mdx
<ComponentPreview name="single-value-field-array-demo" description="A shared form fragment for repeated single text inputs." peekCode showDottedGrid wide />
Use SingleValueFieldArray when each row is a single text input backed by react-hook-form, such as redirect URIs, SSO domains, or repeated attribute mapping values.
import { SingleValueFieldArray } from 'ui-patterns/form/SingleValueFieldArray/SingleValueFieldArray'
<SingleValueFieldArray
control={form.control}
name="redirectUris"
valueFieldName="value"
createEmptyRow={() => ({ value: '' })}
placeholder="https://example.com/callback"
addLabel="Add redirect URI"
/>
SingleValueFieldArray owns the row add/remove behavior and renders the per-input form messages for you. Compose it inside FormItemLayout when you want the standard label, description, and message treatment around the entire section.
SingleValueFieldArray for repeated single text values such as redirect URIs and domains.Select.