- Docs
- components
- FileTrigger
FileTrigger
A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.
Preview
Code
Installation
Copy & Paste
Install the button.tsx component here
Import FileTrigger from react-aria-components
Usage
Button
Preview
Code
Input
A file input can be created with an <Input type=“file”>
element, but this supports limited styling options and may not integrate well with the overall design of a website or application.
To overcome this, FileTrigger extends the functionality of the standard file input element by working with a pressable child such as a Button to create accessible file inputs that can be style as needed.
Preview
Code