[{"data":1,"prerenderedAt":353},["ShallowReactive",2],{"navigation_docs":3,"-docs-guide-gestures":110,"-docs-guide-gestures-surround":348},[4,30,65,95],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F3.quick-start","i-lucide-rocket",{"title":26,"path":27,"stem":28,"icon":29},"AI agents","\u002Fdocs\u002Fgetting-started\u002Fai-agents","docs\u002F1.getting-started\u002F4.ai-agents","i-lucide-bot",{"title":31,"icon":6,"path":32,"stem":33,"children":34,"page":6},"Guide","\u002Fdocs\u002Fguide","docs\u002F2.guide",[35,40,45,50,55,60],{"title":36,"path":37,"stem":38,"icon":39},"ZoomImage","\u002Fdocs\u002Fguide\u002Fzoom-image","docs\u002F2.guide\u002F1.zoom-image","i-lucide-image",{"title":41,"path":42,"stem":43,"icon":44},"Plain images","\u002Fdocs\u002Fguide\u002Fplain-images","docs\u002F2.guide\u002F2.plain-images","i-lucide-tags",{"title":46,"path":47,"stem":48,"icon":49},"Open from code","\u002Fdocs\u002Fguide\u002Fopen-from-code","docs\u002F2.guide\u002F3.open-from-code","i-lucide-code",{"title":51,"path":52,"stem":53,"icon":54},"Gestures & keys","\u002Fdocs\u002Fguide\u002Fgestures","docs\u002F2.guide\u002F4.gestures","i-lucide-hand",{"title":56,"path":57,"stem":58,"icon":59},"Accessibility","\u002Fdocs\u002Fguide\u002Faccessibility","docs\u002F2.guide\u002F5.accessibility","i-lucide-accessibility",{"title":61,"path":62,"stem":63,"icon":64},"Under the hood","\u002Fdocs\u002Fguide\u002Funder-the-hood","docs\u002F2.guide\u002F6.under-the-hood","i-lucide-cpu",{"title":66,"icon":6,"path":67,"stem":68,"children":69,"page":6},"Customization","\u002Fdocs\u002Fcustomization","docs\u002F3.customization",[70,75,80,85,90],{"title":71,"path":72,"stem":73,"icon":74},"Options","\u002Fdocs\u002Fcustomization\u002Foptions","docs\u002F3.customization\u002F1.options","i-lucide-settings-2",{"title":76,"path":77,"stem":78,"icon":79},"Theming","\u002Fdocs\u002Fcustomization\u002Ftheming","docs\u002F3.customization\u002F2.theming","i-lucide-palette",{"title":81,"path":82,"stem":83,"icon":84},"Styling with classes","\u002Fdocs\u002Fcustomization\u002Fstyling","docs\u002F3.customization\u002F3.styling","i-lucide-brush",{"title":86,"path":87,"stem":88,"icon":89},"Custom buttons","\u002Fdocs\u002Fcustomization\u002Fcustom-buttons","docs\u002F3.customization\u002F4.custom-buttons","i-lucide-square-plus",{"title":91,"path":92,"stem":93,"icon":94},"Recipes","\u002Fdocs\u002Fcustomization\u002Frecipes","docs\u002F3.customization\u002F5.recipes","i-lucide-chef-hat",{"title":96,"icon":6,"path":97,"stem":98,"children":99,"page":6},"API","\u002Fdocs\u002Fapi","docs\u002F4.api",[100,105],{"title":101,"path":102,"stem":103,"icon":104},"useImageViewer()","\u002Fdocs\u002Fapi\u002Fuse-image-viewer","docs\u002F4.api\u002F1.use-image-viewer","i-lucide-square-function",{"title":106,"path":107,"stem":108,"icon":109},"Types","\u002Fdocs\u002Fapi\u002Ftypes","docs\u002F4.api\u002F2.types","i-lucide-braces",{"id":111,"title":51,"body":112,"description":341,"extension":342,"links":343,"meta":344,"navigation":345,"path":52,"seo":346,"stem":53,"__hash__":347},"docs\u002Fdocs\u002F2.guide\u002F4.gestures.md",{"type":113,"value":114,"toc":333},"minimark",[115,119,221,226,229,283,287,303,307,322,326],[116,117,118],"p",{},"Gestures run on Pointer Events, the same for mouse and touch. The direction of a drag is decided once, by its first few pixels.",[120,121,122,140],"table",{},[123,124,125],"thead",{},[126,127,128,131,134,137],"tr",{},[129,130],"th",{},[129,132,133],{},"Mouse",[129,135,136],{},"Touch",[129,138,139],{},"Keyboard",[141,142,143,165,179,191,207],"tbody",{},[126,144,145,149,152,155],{},[146,147,148],"td",{},"Next \u002F previous",[146,150,151],{},"drag sideways, arrow buttons",[146,153,154],{},"swipe",[146,156,157,161,162],{},[158,159],"kbd",{"value":160},"←"," ",[158,163],{"value":164},"→",[126,166,167,170,173,176],{},[146,168,169],{},"Zoom in \u002F out",[146,171,172],{},"click the image, wheel, zoom button",[146,174,175],{},"double tap, pinch",[146,177,178],{},"—",[126,180,181,184,187,189],{},[146,182,183],{},"Pan a zoomed image",[146,185,186],{},"drag",[146,188,186],{},[146,190,178],{},[126,192,193,196,199,202],{},[146,194,195],{},"Close",[146,197,198],{},"click outside, drag up or down, close button",[146,200,201],{},"tap outside, drag up or down",[146,203,204],{},[158,205],{"value":206},"Esc",[126,208,209,212,214,216],{},[146,210,211],{},"Move between buttons",[146,213,178],{},[146,215,178],{},[146,217,218],{},[158,219],{"value":220},"Tab",[222,223,225],"h2",{"id":224},"the-feel","The feel",[116,227,228],{},"It comes down to a few tuned numbers:",[230,231,232,245,251,257,263,269],"ul",{},[233,234,235,239,240,244],"li",{},[236,237,238],"strong",{},"Opening, closing and zoom"," take 333 ms on ",[241,242,243],"code",{},"cubic-bezier(.4, 0, .22, 1)",".",[233,246,247,250],{},[236,248,249],{},"The strip"," settles with a critically damped spring, starting at the velocity of your throw. A throw faster than 0.5 px\u002Fms switches the slide even after a tiny drag; otherwise more than half of the neighbour has to be on screen.",[233,252,253,256],{},[236,254,255],{},"Swiping without a pause"," never loses a swipe: a flick is judged by its own direction, even while the strip is still catching up with the previous slide.",[233,258,259,262],{},[236,260,261],{},"Drag to close"," lags behind the finger (friction 0.6) and fades the backdrop — it's gone at a third of the screen height. It closes when the image, with its throw, would travel past 40 % of that third.",[233,264,265,268],{},[236,266,267],{},"Past the edges"," of the strip and of a zoomed image, movement continues with friction 0.35. The strip springs back; a thrown zoomed image glides on and bounces slightly off its edge.",[233,270,271,274,275,282],{},[236,272,273],{},"Zoom"," goes up to the natural size of the image, but at least 2× and at most ",[276,277,279],"a",{"href":278},"\u002Fdocs\u002Fcustomization\u002Foptions#maxzoom",[241,280,281],{},"maxZoom",". The point under the cursor or between the fingers stays in place.",[222,284,286],{"id":285},"controls-that-step-aside","Controls that step aside",[116,288,289,290,296,297,244],{},"With a mouse, the buttons, arrows and counter fade out when the mouse rests for 4 seconds and come back on the next move or key — the caption fades too, unless ",[276,291,293],{"href":292},"\u002Fdocs\u002Fcustomization\u002Foptions#idlehidescaption",[241,294,295],{},"idleHidesCaption"," is off. Tune it with ",[276,298,300],{"href":299},"\u002Fdocs\u002Fcustomization\u002Foptions#idledelay",[241,301,302],{},"idleDelay",[222,304,306],{"id":305},"on-a-phone","On a phone",[230,308,309,312,319],{},[233,310,311],{},"A single tap on the image does nothing — a double tap zooms. A tap outside closes.",[233,313,314,315,318],{},"The arrow buttons are hidden on touch screens (",[241,316,317],{},"pointer: coarse",").",[233,320,321],{},"Lifting one finger of a pinch lets you keep panning with the other.",[222,323,325],{"id":324},"reduced-motion","Reduced motion",[116,327,328,329,332],{},"With ",[241,330,331],{},"prefers-reduced-motion: reduce"," the viewer opens, closes, zooms and scrolls without animations; springs jump to their end value.",{"title":334,"searchDepth":335,"depth":335,"links":336},"",2,[337,338,339,340],{"id":224,"depth":335,"text":225},{"id":285,"depth":335,"text":286},{"id":305,"depth":335,"text":306},{"id":324,"depth":335,"text":325},"How people move through the viewer with a mouse, a finger or a keyboard.","md",null,{},{"icon":54},{"title":51,"description":341},"nvPCc6_CeND1hWwhlm-Gr_qOZrhXEX2TZylWrb0WNMs",[349,351],{"title":46,"path":47,"stem":48,"description":350,"icon":49,"children":-1},"useImageViewer() opens any list of images, with or without thumbnails on the page.",{"title":56,"path":57,"stem":58,"description":352,"icon":59,"children":-1},"Dialog semantics, keyboard, focus and labels.",1794492279447]