File upload
Info alert:Beta feature
This Beta component is currently under review, so please join in and give us your feedback on the PatternFly forum
Use the File upload component to upload the contents of a file into the browser for further processing. Once uploaded content may optionally be edited. While the component can upload any file, it is primarily designed for use with text files where the context can easily be displayed in the text area.
ExamplesDocumentationCSS VariablesExamples
Documentation
Overview
Usage
Class | Applied to | Outcome |
---|---|---|
.pf-c-file-upload | <div> , <form> | Initiates the file upload component. Required. |
.pf-c-file-upload__file-select | <div> | Initiates the file select element. Required |
.pf-c-file-upload__file-details | <div> | Initiates the file details element. Required |
.pf-c-file-upload__file-details-spinner | <div> | Initiates the file details element. Required |
.pf-m-drag-hover | .pf-c-file-upload | Modifies file upload for when an element is dragged or dropped inside of its container. |
.pf-m-loading | .pf-c-file-upload | Modifies file upload for the loading state. |
CSS Variables
.pf-c-file-upload | --pf-c-file-upload--m-loading__file-details--before--BackgroundColor | #fff | ||
.pf-c-file-upload | --pf-c-file-upload--m-loading__file-details--before--Left | 1px | ||
.pf-c-file-upload | --pf-c-file-upload--m-loading__file-details--before--Right | 1px | ||
.pf-c-file-upload | --pf-c-file-upload--m-loading__file-details--before--Bottom | 1px | ||
.pf-c-file-upload | --pf-c-file-upload--m-drag-hover--before--BorderWidth | 1px | ||
.pf-c-file-upload | --pf-c-file-upload--m-drag-hover--before--BorderColor | #06c | ||
.pf-c-file-upload | --pf-c-file-upload--m-drag-hover--before--ZIndex | 100 | ||
.pf-c-file-upload | --pf-c-file-upload--m-drag-hover--after--BackgroundColor | #06c | ||
.pf-c-file-upload | --pf-c-file-upload--m-drag-hover--after--Opacity | .1 | ||
.pf-c-file-upload | --pf-c-file-upload__file-details__c-form-control--MinHeight | calc(4rem * 2) | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--BackgroundColor | #f0f0f0 | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--after--BorderTopColor | #f0f0f0 | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--after--BorderRightColor | #f0f0f0 | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--after--BorderBottomColor | #8a8d90 | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--after--BorderLeftColor | #f0f0f0 | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--disabled--after--BorderWidth | 1px | ||
.pf-c-file-upload | --pf-c-file-upload__file-select__c-button--m-control--OutlineOffset | calc(-1 * 0.25rem) | ||