Skip to content
IzzyBlazor 0.1.0-alpha.17

Enter all results ↑ ↓ move Esc close

FileUpload

A drop zone around a real file input.

IzzyBlazor.FileUpload in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.17 assembly and its doc comments.

Properties (17)

Namestring required

The form field name the files post under. On static pages, name the page property the same (or use [SupplyParameterFromForm(Name = "...")]).

Labelstring?

The visible label.

HideLabelbool = false

Hides the label but keeps it for screen readers.

Hintstring?

Help text under the zone.

Requiredbool = false

Whether a file must be chosen before the form posts.

Disabledbool = false

Disables the picker.

Acceptstring?

The file types to offer, as the accept attribute: "image/*", ".pdf,.docx". A hint for the picker only; check types on the server too.

Multiplebool = false

Allows choosing several files.

The largest file allowed, in bytes. With JavaScript, larger files are flagged before the form posts. Always check on the server too, and set the server's request size limit to match.

MaxFilesint = 10

On interactive pages, the most files OnChange receives; extra ones are left out. Defaults to 10.

TooLargeTextstring?

The message for a file over MaxFileSize: {0} is its name, {1} the limit.

The message for a chosen or dropped file that doesn't match Accept: {0} is its name. (The picker's "All files" option and drops both get past the type filter.)

ChooseTextstring? (computed)

The link that opens the picker. Defaults to "Choose a file" ("Choose files" with Multiple).

DragTextstring? (computed)

The text after the link. Defaults to "or drag it here" ("or drag them here" with Multiple). Not shown on touch screens, where dragging isn't an option.

AcceptTextstring? (computed)

Small text under the prompt. Defaults to the types and size allowed, from Accept and MaxFileSize: "PNG or JPG · up to 2 MB". An empty string shows none. With JavaScript, the chosen file's name and size take its place.

IconIconData? (computed)

The zone's icon. Defaults to an arrow out of a tray.

ErrorsIReadOnlyList<string>?

Validation messages to show under the zone, such as from server checks.

Item props (from LayoutItemBase)

MarginResponsive<int>Responsive

Margin on all sides, in spacing steps (-16 to 16; one step = 4px).

MarginXResponsive<int>Responsive

Horizontal margin. When set, replaces Margin on this axis.

MarginYResponsive<int>Responsive

Vertical margin. When set, replaces Margin on this axis.

MarginTopResponsive<int>Responsive

Top margin. When set, replaces MarginY and Margin on this side.

MarginBottomResponsive<int>Responsive

Bottom margin. When set, replaces MarginY and Margin on this side.

MarginStartResponsive<int>Responsive

Margin at the start (left in left-to-right text, right in right-to-left). Replaces MarginX and Margin on this side.

MarginEndResponsive<int>Responsive

Margin at the end (right in left-to-right text, left in right-to-left). Replaces MarginX and Margin on this side.

WidthResponsive<Length>Responsive

Width.

MinWidthResponsive<Length>Responsive

Minimum width.

MaxWidthResponsive<Length>Responsive

Maximum width.

Growbool = false

Whether to grow into free space inside a Stack, Row or Column: <Box Grow>.

Shrinkbool = true

Whether to shrink when space is short inside a Stack, Row or Column. Defaults to true; Shrink="false" keeps the size.

BasisResponsive<Length>Responsive

Starting size inside a Stack, before growing or shrinking.

AlignSelfResponsive<Align>Responsive

Alignment across the parent's direction, overriding the parent's Align for this component only, such as a button lined up with the bottom of labeled fields in a Row.

ColSpanResponsive<int>Responsive

How many columns it spans in a Form or Fieldset with Columns, or a Grid; GridSpan.Full for the whole row. Never more than the columns shown, so a form that narrows to one column needs no breakpoints.

NewRowbool = false

Starts a new row in a Form or Fieldset with Columns, or a Grid, leaving the rest of the row before it empty.

Common props (from IzzyComponentBase)

Classstring?

Extra CSS classes, merged after the component's own classes.

Stylestring?

Inline style, appended after the component's generated custom properties.

HiddenFromBreakpoint?

Hides the component from this breakpoint up, such as a menu button only phones need.

VisibleFromBreakpoint?

Shows the component only from this breakpoint up, such as header links for wide screens.

Events (1)

OnChangeEventCallback<IReadOnlyList<IBrowserFile>>Interactive only

On interactive pages, runs with the chosen files, leaving out any over MaxFileSize (the zone flags those). Read one with OpenReadStream(MaxFileSize): its default limit is 500 KB.