@govuk-react/file-upload

File input component with label expected as children.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@govuk-react/file-upload
0.10.13 months ago4 years agoMinified + gzip package size for @govuk-react/file-upload in KB

Readme

FileUpload

Import

import FileUpload from '@govuk-react/file-upload';

Help users select and upload a file.
  • https://govuk-react.github.io/govuk-react/?path=/docs/file-upload
  • https://design-system.service.gov.uk/components/file-upload/

Properties

Prop | Required | Default | Type | Description :--- | :------- | :------ | :--- | :---------- acceptedFormats | | ``undefined`` | string | error | | `````` | boolean | Apply error state styling to the component hint | | ``undefined`` | string | Optional hint text key | | `````` | Key | margin | | `````` | Margin | Margin | mb | | `````` | string | number | meta | | ``{}`` | { error?: string | string; touched?: boolean; } | Final form meta object, pending adjustment/removal name | | ``undefined`` | string | onChange | | ``undefined`` | ChangeEventHandler | padding | | `````` | Padding | Padding | ref | | `````` | Ref |