🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@bolttech/atoms-file-upload

Package Overview
Dependencies
Maintainers
10
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bolttech/atoms-file-upload

A simple React component for file uploads, supporting both traditional input and drag & drop.

latest
npmnpm
Version
0.0.2
Version published
Maintainers
10
Created
Source

FileUpload Component

A simple React component for file uploads, supporting both traditional input and drag & drop.

Installation

Use npm or yarn to install the component.

npm install @bolttech/frontend-foundations @bolttech/atoms-file-upload

or

yarn add @bolttech/frontend-foundations @bolttech/atoms-file-upload

Props

The FileUpload component accepts the following properties:

PropTypeDescription
idstringThe ID attribute for the upload element.
dataTestIdstringIdentifier for automated tests.
textstringLabel text for the upload.
dragActiveTextstringText displayed when files are dragged over the dropzone.
variantstringUpload type: 'input' or 'dropzone'.
acceptstringAccepted file types (e.g., 'image/png').
multiplebooleanAllows selection of multiple files.
disabledbooleanDisables the component.
valueFile[]List of selected files.
errorMessagestringCustom error message.
onChangefunctionCallback to handle selected files.

Usage

import React, { useState } from 'react';
import { FileUpload } from '@bolttech/atoms-file-upload';
import { bolttechTheme, BolttechThemeProvider } from '@bolttech/frontend-foundations';

const ExampleComponent = () => {
  const [files, setFiles] = useState([]);

  const handleFileChange = async (selectedFiles) => {
    setFiles(selectedFiles);
    // Return an array of objects { file, success, message }
    return selectedFiles.map(file => ({
      file,
      success: true,
      message: `${file.name} uploaded successfully`
    }));
  };

  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <FileUpload
        id="custom-file-upload"
        text="Select or drag files"
        variant="dropzone"
        multiple
        value={files}
        onChange={handleFileChange}
      />
    </BolttechThemeProvider>
  );
};

export default ExampleComponent;

Contributing

Contributions are welcome! For bug fixes, improvements, or new features, please open an issue or submit a pull request.

Please make sure to follow the code standards and test your

FAQs

Package last updated on 07 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts