Framework Components
React
Integrate PichaFlow into your React and Next.js applications.
The @pichaflow/react package provides a functional upload component.
Usage
import { PichaUpload } from '@pichaflow/react';
export default function MyPage() {
const handleSuccess = (res) => {
console.log('Upload complete:', res.id);
};
return (
<PichaUpload
apiKey="sk_live_..."
onSuccess={handleSuccess}
className="my-custom-dropzone"
/>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | Your PichaFlow Secret Key. |
onSuccess | function | - | Callback for successful uploads. |
onError | function | - | Callback for failed uploads. |
onProgress | function | - | Callback for progress updates. |