x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<div role="group" tabindex="0" aria-label="Panorama — drag to look around" aria-roledescription="360 degree panorama viewer" style="--panorama-height: 400px;" data-controller="midwest-panorama" data-midwest-panorama-wrap-value="true" data-midwest-panorama-auto-rotate-value="30.0" data-midwest-panorama-start-value="0.0" class="midwest-panorama media-image has-controls is-wrap"> <div class="midwest-panorama-viewport" data-midwest-panorama-target="viewport"> <div class="midwest-panorama-stage" data-midwest-panorama-target="stage"> <img class="midwest-panorama-media" data-midwest-panorama-target="media" src="https://picsum.photos/seed/mw-pano-auto/2400/600" alt="Auto-rotating panorama" draggable="false" loading="lazy"> </div> </div> <div class="midwest-panorama-hint" data-midwest-panorama-target="hint" aria-hidden="true"> <div class="midwest-icon " aria-hidden="true"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" role="img" aria-label="Move outline"><title>Move outline</title> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"></path></svg> </div> </div> Drag to explore </div> <div class="midwest-panorama-controls"> <button title="Reset view" aria-label="Reset view" data-action="click->midwest-panorama#reset" data-midwest-panorama-target="reset" class="midwest-button variant-default size-small pill contrast theme-primary midwest-panorama-reset" name="button"> <span class="midwest-button-content"> <div class="midwest-icon " aria-hidden="true"> <div class="midwest-icon-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="Midwest-Icon__Svg" viewbox="0 0 512 512" focusable="false" aria-hidden="true"><path d="M320 146s24.36-12-64-12a160 160 0 10160 160" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"></path></svg> </div> </div> </span> <div class="midwest-loading-icon" role="img" aria-label="Loading" aria-hidden="true" style="display: none"> <div class="midwest-loading-icon-inner"> <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL --> <svg viewbox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="Midwest-LoadingIcon__Svg" focusable="false" aria-hidden="true"> <circle cx="15" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="60" cy="15" r="9" fill-opacity="0.3"> <animate attributename="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcmode="linear" repeatcount="indefinite"></animate> </circle> <circle cx="105" cy="15" r="15"> <animate attributename="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcmode="linear" repeatcount="indefinite"></animate> <animate attributename="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcmode="linear" repeatcount="indefinite"></animate> </circle> </svg> </div> </div> </button> </div> <p class="sr-only" aria-live="polite" aria-atomic="true" data-midwest-panorama-target="status"></p></div>1
2
3
4
5
<%= midwest_panorama( src: "https://picsum.photos/seed/mw-pano-auto/2400/600", alt: "Auto-rotating panorama", auto_rotate: 30) %>Auto-rotate
Set auto_rotate: to a pixels-per-second speed and the panorama drifts
on its own, pausing while the pointer is over it or it holds keyboard
focus, and honoring prefers-reduced-motion.
No params configured.
No assets to display.
Add a .js or .css file alongside the component to see it here.
Figma embed for Panorama/auto_rotate
Annotate a preview to embed its Figma design here:
@figma "https://figma.com/..."