eds-input-file

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

eds-input-file Open in Storybook

See It in Use with Code

Check out this practical implementation of component.

Plain HTML

In React

In Vue

Properties

PropertyAttributeDescriptionTypeDefault
acceptacceptAccepted file types (e.g., “.pdf,.png,.jpg” or “image/*”).stringundefined
accessibleNameaccessible-nameAccessible name for the native control (set as aria-label). eds-input-field passes its label here: its visible stringundefined
buttonLabelbutton-labelButton label text. Defaults to “Choose Files” (or “Choose File” if not multiple).stringundefined
disableddisabledIf true, the input is disabled.booleanfalse
inputIdinput-idThe id attribute of the internal input element. Defaults to name if not set.stringundefined
maxFileSizemax-file-sizeMaximum file size in bytes. If not set, no size limit is enforced client-side.numberundefined
multiplemultipleIf true, allows multiple file selection.booleanfalse
name (required)namestringundefined
requiredrequiredIf true, the input is required.booleanfalse

Events

EventDescriptionType
edsfileEmits when files are selected or removed. Use event.detail.files to access the FileList.CustomEvent<{ files: File[]; }>

Dependencies

Used by

Graph

graph TD;
  eds-input-field --> eds-input-file
  style eds-input-file fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS