Dynamic file inputs

What are you trying to accomplish
I want to allow a dynamic number of file inputs to be passed to a component

Code stack you are integrating Builder with
NextJS

I have build my own carousel component, I just registered it with Builder and set the input type to ‘file’. However this only accepts one file, and I need it to accept a dynamic number of files (images). The carousel component I’ve written receives its props and maps through them created Next <Image> components. This determines how many images it slides through.

What’s the best practice for this sort of scenario? I can’t imagine it’s the first time it’s come up.

I haven’t attached a Builder link as there’s nothing to show at the moment, please let me know if my description above needs any clarification.

Hi @Sam,

We hope you’re doing well!

I think you can use object input type in your carousel which has n number of subfields of file type. You may refer to this doc:- Input types for custom components - Builder.io

For a more complete list take a look at these docs for custom components:
Component Options
Input Options
Input Types

Hope this helps, let us know if you’ve further questions!