Framework Components
Qwik
Integrate PichaFlow into your Qwik applications with fine-grained reactivity.
The @pichaflow/qwik package provides a high-performance upload component optimized for Qwik's resumability.
Usage
import { component$, $ } from '@builder.io/qwik';
import { PichaUpload } from '@pichaflow/qwik';
export default component$(() => {
const onUploadSuccess$ = $((response) => {
console.log('Uploaded to Edge:', response.url);
});
return (
<PichaUpload
apiKey="sk_live_your_secret_key"
tags={['ecommerce', 'qwik']}
onSuccess$={onUploadSuccess$}
/>
);
});
Props
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | Your PichaFlow Secret Key. |
baseUrl | string | https://api.pichaflow.com | Optional API base URL. |
tags | string[] | [] | Tags to apply to the upload. |
Events (QRLs)
Qwik events use the $ suffix to indicate they are lazy-loadable.
| Prop | Type | Description |
|---|---|---|
onSuccess$ | PropFunction | Fired when upload completes successfully. |
onError$ | PropFunction | Fired on network or server errors. |