@axa-ch/input-file
@axa-ch/input-file
npm i @axa-ch/input-file
@axa-ch/input-file

@axa-ch/input-file

AXA CH UI component library. Please share, comment, create issues and work with us!

by axa-ch-webhub-cloud

7.0.9 (see all)License:Copyright 2019 AXA Versicherungen AGTypeScript:Not Found
npm i @axa-ch/input-file
Readme

Input file

Input-File provides a clickable element, which can be used in forms to upload files. The upload function can be restricted with several attributes. They may display text, icons, or both. Input-File can be styled via properties like the axa-button.

Properties

text

The String attribute text sets the text of the component.

variant

AttributeDetails
variant="secondary"Button in a ghost state
variant="red"Button red
variant="inverted"Button inverted

icon

Based on the string-valued attribute icon, interpreted as icon name, an icon will be rendered. To see the full list of possible icons, see the axa-icon README.

large

The Boolean attribute large specifies the size of an input file. Setting this attribute will change the height of an input file.

motionOff

The Boolean attribute motionoff deactivates hover animation.

disabled

The Boolean attribute disabled disables the input file, but not natively like in the button.

accept

The String attribute accept specifies a filter for which file types the user can pick from.

AttributeDetails
accept=""Allow every file type
accept="image/*"Files with media type image are accepted
accept="video/*"Files with media type video are accepted
accept="audio/*"Files with media type audio are accepted
accept=".png"files of the specified extension are accepted
accept="image/jpg, image/jpeg, image/png"Allow multiple file types

capture

The Boolean attribute capture indicates that the capture of media directly from the device’s camera and/or microphone is preferred.

AttributeDetails
captureAllow capturing media from device
accept="audio/*" capture="capture"Allow capturing audio from device
accept="video/*" capture=""Allow capturing video from device

You can restrict the different media types like audio, video or photo with the accept attribute.

multiple

The Boolean attribute multiple specifies how many file the user can select.

onChange

The function-valued attribute onChange can be used as a callback prop for React and other frameworks.

Downloads/wk

67

GitHub Stars

98

LAST COMMIT

10mos ago

MAINTAINERS

49

CONTRIBUTORS

35

OPEN ISSUES

12

OPEN PRs

1
VersionTagPublished
7.0.9
latest
16d ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate