Default value for repeater

I’m trying to set a default value for a repeater field.
According to the this I should be able to set a “a default array value”

I tried these:

test_1:
    label: test 1
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
    default:
        0:
            color: "#ffffff"
        1:
            color: "#000000"
        2:
            color: "#ffffff"
        3:
            color: "#000000"
test_2:
    label: test 2
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
    default:
        0:
            'color: "#ffffff"'
        1:
            'color: "#000000"'
        2:
            'color: "#ffffff"'
        3:
            'color: "#000000"'
test_3:
    label: test 3
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
    default: '[{ color: "#fff" }, { color: "#000" }, { color: "#fff" }, { color: "#000" }]'
test_4:
    label: test 4
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
    default:
        - color: "#ffffff"
        - color: "#000000"
        - color: "#ffffff"
        - color: "#000000"

This is what I get:
Screenshot 2026-01-29 at 12.39.45

And this is what I’m trying to get:

Maybe I’m doing it wrong :frowning:

Your test_4 example should work.

test_4:
    label: test 4
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
    default:
        - color: "#ffffff"
        - color: "#000000"
        - color: "#ffffff"
        - color: "#000000"

example for multiple values

test_4:
    label: test 4
    type: repeater
    form:
        fields:
            color:
                type: colorpicker
            color_stop:
                type: number
    default:
        - color: "#efe0ff"
          color_stop: 125
        - color: "#00e0ff"
          color_stop: 325

If this does not work for you, check if you’re using spaces as indentation in YAML. Tabs are not supported and you should set up your IDE to replace tabs with spaces for YAML file (or in general imho)