File Trigger

File Triggers are your go-to for grabbing files from the file system, acting like a digital fishing rod to hook up goodies from local or cloud storage.

Basic

A FileTrigger lets users dive into the file system with any clickable React Aria or React Spectrum part, or custom bits made with usePress.

Installation

If you hit any issues, make sure you check out the installation guide here.

Composed Components

When you plug this component from the CLI, it autoloads all the composed components. No need to toss 'em in one at a time.

The File Trigger's decked out with several components to make it bangin'.

Button

Buttons be the real MVPs, man! They're all about gettin' stuff done, whether it’s slamming that form submit or hoppin' to another page.

Manual Installation

Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.

Anatomy

Import the components and use them as shown below, adapting the structure to fit each component.

Folder

A FileTrigger that lets users select a folder from the file system.

Multiple

A FileTrigger that allows users to select multiple files from the file system.

Camera

A FileTrigger that lets users capture images using their device's camera.

Avatar

I got an example of a FileTrigger that lets peeps grab an avatar from their file stash. It mashes up components like avatar and drop zone, so your crew can drop or pick a file straight from the file system.

Drop Zone

Drag and drop files here is like droppin' postcards into a mailbox easy and effective for quick uploads.

Avatar

It’s more than a picture with curved corners. It’s a vibe, subtly revealing secrets. A cheeky peek into depth, grabbing more than just your gaze.

Controlled

You can use the onSelect prop to snag the selected files.

Disabled

A FileTrigger that is disabled.