Installation
Basic Implementation
1. Wrap Your App
Wrap your application with theFlatfileProvider
:
2. Add Import Trigger
Use theuseFlatfile
hook to open Flatfile:
3. Get Your Credentials
publishableKey: Get from Platform Dashboard → Developer Settings For authentication guidance including JWT tokens and user management, see Advanced Configuration.Complete Example
The example below will open an empty space. To create the sheet your users
should land on, you’ll want to create a workbook as shown further down this
page.
Configuration Options
For all configuration options including authentication, theming, and advanced settings, see Advanced Configuration.Using Space Component
For more control, you can use theSpace
component directly:
Creating New Spaces
To create a new Space each time:- Add a
workbook
configuration object. Read more about workbooks here. - Optionally deploy a
listener
for custom data processing. Your listener will contain your validations and transformations
Reusing Existing Spaces
For production applications, you should create Spaces on your server and pass the Space ID to your React application:Server-side (Node.js/Express)
Client-side (React)
- Create Spaces with server-side authentication
- Add custom event listeners and data processing
- Control Space lifecycle and cleanup
TypeScript Support
The React SDK includes full TypeScript support:Next Steps
- Advanced Configuration: Authentication, theming, and advanced options
- Server Setup: Backend integration and event handling
- API Integration: Use Flatfile API to retrieve processed data
- Package Documentation: See @flatfile/react documentation
Quick Links
Advanced Configuration
Authentication, theming, and advanced options
Server Setup
Backend integration and event handling