Skip to content

Examples ​

This section turns real Resux Lab regression pages into focused recipes you can copy into an application. The examples are intentionally tied to code that runs in resux-lab, rather than inventing APIs only for documentation.

Framework fundamentals ​

ExampleWhat it demonstratesLab source
CounterMinimal resumable interactionFramework example
State and Resumable HandlersuseState(), multiple handler actions, lazy interactionpages/state.vue
Forms and v-modelInputs, select, checkbox, submit and reset statepages/forms.vue
API and FetchServer API calls and async dataExisting example
Blog RoutesFile routes and dynamic pagesExisting example
Auth MiddlewareRoute middlewareExisting example
Error HandlinguseError() and createError()pages/features/errors.vue
Device DetectionuseDevice() and parseUserAgent()pages/features/device.vue

Runtime boundaries and performance ​

ExampleWhat it demonstratesLab source
Vue IslandKeep Vue runtime ownership inside a nested widgetpages/vue-island.vue, islands/vue/IslandCounter.vue
Performance MeasurementsMeasure a state patch and repeated API requests in the browserpages/performance.vue
Progressive PackageProgressive client enhancementExisting example
Package IntegrationsVisible, idle, interaction, immediate, page-load, manual and SSR package patternspages/package-tests/

Media and deployment ​

ExampleWhat it demonstratesLab source
Media OptimizationImage transformation and deliveryExisting example
Media Placeholders and PictureBlur, skeleton, spinner, custom placeholders, picture formats and fallback imagespages/media-test/images.vue
Docker DeploymentContainer deploymentExisting example

Use the lab as executable documentation ​

The compatibility lab is useful for more than screenshots. Its pages are exercised by end-to-end regression tests covering framework features, media, package integrations and layout behavior. When a docs example is marked Lab-backed, use the linked lab file as the executable reference and the documentation page as the explanation of why the pattern works.

Source-aligned documentation for the Resux resumable web framework.