Skip to content

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

Try a sample image

Vue component ​

Vue component — live

PixuCompressor with real sample images

Click or drag image here to compress

Supports JPEG, PNG, WEBP, AVIF, PIXU

React / Angular / Svelte APIs ​

React API — live demo

Same Pixu compress() used by the React component. Pick a sample or upload.

Try a sample image

Before you run local apps ​

bash
npm run build

Then open any example folder, install, and start the dev server.

Available projects ​

FrameworkFolderDev serverDocs
Vue 3examples/vue/:3000Vue
Reactexamples/react/:3001React
Angularexamples/angular/:4200Angular
Svelteexamples/svelte/:3002Svelte
Jacaréexamples/jacare/:3003Jacaré

Vue 3 ​

bash
cd examples/vue && npm install && npm run dev

React ​

bash
cd examples/react && npm install && npm run dev

Angular ​

bash
cd examples/angular && npm install && npm start

Svelte ​

bash
cd examples/svelte && npm install && npm run dev

Jacaré ​

bash
cd examples/jacare && npm install && npm run dev

Shared 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.

Released under the MIT License.