# Dynamic file inputs

**URL:** https://forum.builder.io/t/dynamic-file-inputs/3371
**Category:** Technical Questions
**Tags:** visual-editor, nextjs
**Created:** [March 12, 2023, 4:38pm UTC](https://forum.builder.io/t/dynamic-file-inputs/3371 "2023-03-12T16:38:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://forum.builder.io/u/Sam)
#### Post date: [March 12, 2023, 4:38pm UTC](https://forum.builder.io/t/dynamic-file-inputs/3371/1 "2023-03-12T16:38:39Z")

</div>

**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.

---

<div class="post-metadata">

### Author: ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)
#### Post date: [March 15, 2023, 11:27am UTC](https://forum.builder.io/t/dynamic-file-inputs/3371/2 "2023-03-15T11:27:27Z")

</div>

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](https://www.builder.io/c/docs/custom-components-input-types#code-strong-object-strong-code)

For a more complete list take a look at these docs for custom components:  
[Component Options](https://github.com/BuilderIO/builder/blob/main/packages/core/docs/interfaces/Component.md)  
[Input Options](https://github.com/BuilderIO/builder/blob/main/packages/core/docs/interfaces/Input.md)  
[Input Types](https://www.builder.io/c/docs/custom-react-components#input-type-examples)

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