Framework Examples
Runnable projects that share the same documentation layout as this site — header, sample gallery, section cards, brand purple — plus live demos below.
Live demos (in this page)
PIXU compress
Try it live
Pick a sample or upload your own image
Vue component
Vue component — live
PixuCompressor with real sample images
Click or drag image here to compress
Supports JPEG, PNG, WEBP, AVIF, PIXU
Or try a real sample
React / Angular / Svelte APIs
React API — live demo
Same Pixu compress() used by the React component. Pick a sample or upload.
Before you run local apps
bash
npm run buildThen open any example folder, install, and start the dev server.
Available projects
| Framework | Folder | Dev server | Docs |
|---|---|---|---|
| Vue 3 | examples/vue/ | :3000 | Vue |
| React | examples/react/ | :3001 | React |
| Angular | examples/angular/ | :4200 | Angular |
| Svelte | examples/svelte/ | :3002 | Svelte |
| Jacaré | examples/jacare/ | :3003 | Jacaré |
Vue 3
bash
cd examples/vue && npm install && npm run devReact
bash
cd examples/react && npm install && npm run devAngular
bash
cd examples/angular && npm install && npm startSvelte
bash
cd examples/svelte && npm install && npm run devJacaré
bash
cd examples/jacare && npm install && npm run devShared layout
All apps use examples/shared/theme.css — the same documentation chrome as VitePress:
- Content width ~960px
- Header + logo
- Sample gallery
- Section cards
- Brand purple
#7b3fef
Sample photos live in examples/shared/assets/ (also copied to docs/public/ for these live demos).
Importing Pixu
typescript
import { compress, buildDownloadName } from '@pantanal/pixu'Best compression recipe
typescript
const result = await compress(file, {
format: 'image/pixu',
enableSmartQuality: true,
})See PIXU Format and TECR.
