Concepts
OverviewCompositionTestingLayout
Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrapComponents
AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltipUtilities
Feature FlagsForLocal StoragePortalShowsplitPropsThemeimport { FileUploader, FileStatus, processStatus } from '@cerberus/react'To allow users to upload files, use the FileUploader component.
If you choose to process the file, you can use the FileStatus component to display the status of the job.
To customize the FileUploader or FileStatus, we recommend extending the fileUploader or the fileStatus slot recipe in your panda config.
export interface FileUploaderProps extends InputHTMLAttributes<HTMLInputElement> { heading?: string name: string disabled?: boolean}
define function FileUploader(props: FileUploaderProps): ReactNodeexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]export type FileStatusActions = 'cancel' | 'retry' | 'delete'
export interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> { id: string file: string now: number status: processStatus onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void}export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps
define function FileStatus(props: FileStatusProps): ReactNodeThe FileUploader component accepts the following props:
| Name | Default | Description |
|---|---|---|
| heading | The heading for the file uploader | |
| name | The unique name of the file uploader | |
| disabled | false | Whether the file uploader is disabled |
The FileStatus component accepts the following props:
| Name | Default | Description |
|---|---|---|
| id | A unique identifier for the ProgressBar. | |
| file | The name of the file being processed | |
| now | The current progress of the file upload | |
| status | 'todo' | The status of the file upload |
On this page