Components

File Upload

A drop zone and file picker with multi-file support.

Usage

Basic

HTML
<bs:bsui-file-upload accept="image/*" multiple="true" />

Single document

One file at a time, narrowed to the extensions the importer accepts.

HTML
<bs:bsui-file-upload name="invoice" accept=".pdf,.csv" />

Labelled field

Help text carries the size and format rules the accept list cannot express.

PNG or SVG, at least 512 pixels wide.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Company logo" />
  <bs:bsui-file-upload name="logo" accept="image/png,image/svg+xml" />
  <bs:bsui-field-description text="PNG or SVG, at least 512 pixels wide." />
</bs:bsui-field>

Disabled

The drop zone dims and stops accepting clicks or drags.

HTML
<bs:bsui-file-upload accept="image/*" disabled="true" />

Attributes

AttributeTypeDefault
name text
accept text *
multiple toggle false
disabled toggle false
nameAlt text