Saas.js logo

Slingshot

Full-stack React file upload components

Slingshot is a full-stack file upload component with support for drag-and-drop, progress bars, and more. Fully composable and compatible with any styling library.

Upload files fast and securely to any S3-compatible storage with a simple API that runs on any Javascript server runtime.

Example (Next.js)

import { FileUpload } from '@/components/file-upload'
 
export default function Page() {
  return (
    <FileUpload
      profile="avatar"
      maxFiles={1}
      baseUrl="/api/slingshot"
      uploadOnAccept
      meta={{ userId: '123' }}
    />
  )
}

Installation

npm install @saas-js/slingshot @saas-js/slingshot-react

Sponsors

Acknowledgements

This library would not be possible without the following libraries:

License

Apache 2.0

On this page