# Zumly > JavaScript library for hierarchical zoom navigation (ZUI). Navigate in Z (depth) through discrete views in the XY plane with spatial transitions. ## What it is Zumly is a structured, trigger-driven zoom user interface engine. Users zoom into focused elements to open the next view — attention (focus) and depth (Z) stay aligned with layout (XY). It is NOT a freeform pan/zoom canvas or map library. - Framework-agnostic: works with React, Vue, Svelte, Angular, or plain HTML - Pluggable transition drivers: CSS, WAAPI, Anime.js, GSAP, Motion, none, or custom - Plugin system with hash router included - Touch, keyboard, mouse, and wheel input support ## How it works Each screen is a view, written by hand as HTML and CSS. Some elements in a view are triggers. Clicking one scales the current view until the trigger fills the canvas, and the next view grows out of that spot; the parent stays behind, dimmed. Zoom-out is the same transform in reverse. Siblings slide sideways. The zoom reads as continuous when the trigger and its view share a shape. Duration, ease, cover side (width/height), background effects and the animation driver can be set per instance or per trigger (`data-with-*`). ## Key concepts - **Canvas**: Container element with class `zumly-canvas` where views render - **View**: A DOM subtree with root class `z-view`. Sources: HTML strings, URLs, async functions, objects with `render()`, web components. Function views get `ctx.target` (the view itself), `props`, `onCleanup`, and `onActivate` (repaint when the view becomes current again) - **Trigger**: Element with class `zoom-me` and `data-to="viewName"` that initiates zoom-in - **Depth navigation**: Zoom in/out through view hierarchy (Z axis) - **Lateral navigation**: Navigate between sibling views at the same depth level. Triggers that share a view and differ in their data (`data-to="room" data-id="kitchen"`) are separate siblings. Each level keeps its own lateral history; `back()` undoes lateral moves before zooming out - **Driver**: Pluggable animation engine for transitions - **Plugin**: Object with `install(instance, options)` or plain function - **Events**: `viewChanged` fires after every navigation with `{ type, viewName, from, zoomLevel, node }` - **Back button** (`depthNav`): styles `'button'`, `'title'` (title of the view above) or `'rings'` (a ring per level, bands to jump several). Views name themselves with `title` or `data-title` - **Gestures**: `gestures: { follow: true }` makes trackpad, swipe and pinch (`inputs.pinch`) drive the zoom-out with their progress (`zoomOutProgress` event); `zoomOut(2)` / `zoomOut({ to })` climb several levels in one transition - **Rasterize**: `rasterize: { snapdom, stream }` shows views behind as a SnapDOM photo, for smooth zooms with heavy views. With SnapDOM's `stream` plugin the photo follows the view, so a zoom starts from what is on screen; a view whose photo would cost too much to keep current, light views and `data-rasterize="false"` stay live. SnapDOM and its plugins are optional peer dependencies - **WebGL**: `webgl: { snapdom, stream }` (rasterize included) draws zooms in a WebGL canvas and keeps the views behind as textures, with effects in a shader (custom ones in GLSL). `hover: true` prepares a view while the pointer rests on its trigger; `ancestors` (on by default) keeps everything behind past the third level as one picture. For heavy views on weak GPUs. - **Diagnostics**: the console explains typos in view names and options, and a canvas without size ## Quick start ```html