Skip to main content

Various Analog Designs

Moba Analog

Design is inspired from the mobile game League of Legends, Wild Rift.

<xyba-analog no-style class="moba-analog" trail track-from=".moba-background">
<img src="/rift-analog/overlay.svg" slot="overlay" class="overlay" loading="eager" />
<img src="/rift-analog/knob.svg" slot="knob" class="knob" loading="eager" />
<img src="/rift-analog/base.svg" slot="base" class="base" loading="eager" />
<img src="/rift-analog/base_overlay.svg" slot="base" class="base-overlay" loading="eager" />
</xyba-analog>
<div class="moba-background"></div>

Nintendo 2DS D-Pad

Design and images from https://lnkd.itch.io/pbgba-skins

<xyba-analog no-style adapt class="ds-dpad" deadzone=".2">
<div slot="base" class="base">
<img class="dpad down" src="/2ds_buttons/cross_d.png" loading="eager" />
<img class="dpad down_left" src="/2ds_buttons/cross_dl.png" loading="eager" />
<img class="dpad down_right" src="/2ds_buttons/cross_dr.png" loading="eager" />
<img class="dpad left" src="/2ds_buttons/cross_l.png" loading="eager" />
<img class="dpad right" src="/2ds_buttons/cross_r.png" loading="eager" />
<img class="dpad up" src="/2ds_buttons/cross_u.png" loading="eager" />
<img class="dpad up_left" src="/2ds_buttons/cross_ul.png" loading="eager" />
<img class="dpad up_right" src="/2ds_buttons/cross_ur.png" loading="eager" />
<img class="dpad none" src="/2ds_buttons/cross.png" loading="eager" />
</div>
</xyba-analog>

Playstation D-Pad

<xyba-analog no-style adapt class="playstation-dpad" deadzone=".2">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 160 160" slot="base">
<g id="Artboard" fill="currentColor" fill-opacity="0" fill-rule="evenodd" stroke="currentColor" stroke-width="2">
<path id="dpad-up" d="M23.136 8.4c-4.757 0-9.55.558-14.377 1.673a8.98 8.98 0 0 0-5.293 3.53 8.98 8.98 0 0 0-1.636 6.149L5.01 51.05a9 9 0 0 0 2.665 5.53l9.037 8.824A8.973 8.973 0 0 0 23 67.965c2.27 0 4.54-.853 6.288-2.56l9.037-8.826a9 9 0 0 0 2.666-5.53l3.183-31.334a8.98 8.98 0 0 0-1.634-6.145 8.98 8.98 0 0 0-5.286-3.532A62.272 62.272 0 0 0 23.136 8.4Z" transform="translate(57)"/>
<path id="dpad-right" d="M23.136 8.4c-4.757 0-9.55.558-14.377 1.673a8.98 8.98 0 0 0-5.293 3.53 8.98 8.98 0 0 0-1.636 6.149L5.01 51.05a9 9 0 0 0 2.665 5.53l9.037 8.824A8.973 8.973 0 0 0 23 67.965c2.27 0 4.54-.853 6.288-2.56l9.037-8.826a9 9 0 0 0 2.666-5.53l3.183-31.334a8.98 8.98 0 0 0-1.634-6.145 8.98 8.98 0 0 0-5.286-3.532A62.272 62.272 0 0 0 23.136 8.4Z" transform="rotate(90 51.5 108.5)"/>
<path id="dpad-down" d="M23.136 8.4c-4.757 0-9.55.558-14.377 1.673a8.98 8.98 0 0 0-5.293 3.53 8.98 8.98 0 0 0-1.636 6.149L5.01 51.05a9 9 0 0 0 2.665 5.53l9.037 8.824A8.973 8.973 0 0 0 23 67.965c2.27 0 4.54-.853 6.288-2.56l9.037-8.826a9 9 0 0 0 2.666-5.53l3.183-31.334a8.98 8.98 0 0 0-1.634-6.145 8.98 8.98 0 0 0-5.286-3.532A62.272 62.272 0 0 0 23.136 8.4Z" transform="rotate(-180 51.5 80)"/>
<path id="dpad-left" d="M23.136 8.4c-4.757 0-9.55.558-14.377 1.673a8.98 8.98 0 0 0-5.293 3.53 8.98 8.98 0 0 0-1.636 6.149L5.01 51.05a9 9 0 0 0 2.665 5.53l9.037 8.824A8.973 8.973 0 0 0 23 67.965c2.27 0 4.54-.853 6.288-2.56l9.037-8.826a9 9 0 0 0 2.666-5.53l3.183-31.334a8.98 8.98 0 0 0-1.634-6.145 8.98 8.98 0 0 0-5.286-3.532A62.272 62.272 0 0 0 23.136 8.4Z" transform="rotate(-90 51.5 51.5)"/>
</g>
</svg>
</xyba-analog>

Steering wheel

<xyba-analog class="steering-wheel" axis="x">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 148 148" slot="base" class="steering-wheel__base">
<g id="base-copy" fill="currentColor" fill-rule="evenodd" stroke="none" stroke-width="1">
<path id="Oval" fill-rule="nonzero" d="M74 0c40.87 0 74 33.13 74 74 0 23.816-11.25 45.004-28.727 58.54-12.05 9.333-27.06 8.591-43.384 8.523l-2.52-.003-1.274.005c-15.896.09-30.546 1.095-42.43-7.81C11.655 119.756 0 98.238 0 74 0 33.13 33.13 0 74 0Zm0 12c-34.242 0-62 27.758-62 62 0 19.584 9.127 37.628 24.383 49.29l.479.362c6.031 4.52 12.315 5.577 29.306 5.465l7.188-.057 2.891.005 4.619.026c18.033.05 24.702-1.115 31.059-6.039C127.01 111.37 136 93.44 136 74c0-34.242-27.758-62-62-62Z"/>
<path id="Oval" fill-rule="nonzero" d="M74 54c11.046 0 20 8.954 20 20s-8.954 20-20 20-20-8.954-20-20 8.954-20 20-20Zm0 10c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10-4.477-10-10-10Z"/>
<path id="Path-2" d="M14.23 50.131c16.959-5.327 22.356-15.687 25.116-31.251L24.31 25.544 14.23 50.131Z"/>
<path id="Path-2" d="M108.77 50.131c16.96-5.327 22.357-15.687 25.116-31.251l-15.035 6.664-10.081 24.587Z" transform="matrix(-1 0 0 1 242.656 0)"/>
<path id="Path-3" fill-rule="nonzero" d="m20.422 59.418-.607 2.349a6.5 6.5 0 0 0 3.725 7.595l27.12 11.67a1.5 1.5 0 0 1 .58 2.313l-16.574 20.79a6.5 6.5 0 0 0 .776 8.92l1.54 1.363a6.5 6.5 0 0 0 8.54.066l22.54-19.339a6.5 6.5 0 0 0 1.337-8.284l-2.176-3.617a6.501 6.501 0 0 0-.451-.655c-1.941-2.48-3.115-4.457-3.524-5.831-.39-1.305-.4-3.155.025-5.53a1.5 1.5 0 0 1 .036-.154l.88-3.021a5.572 5.572 0 0 0-4.262-7.023l-31.942-6.362a6.5 6.5 0 0 0-7.563 4.75Zm6.586.153 31.99 6.375a.572.572 0 0 1 .39.71l-.88 3.02c-.064.221-.116.444-.157.67-.552 3.083-.537 5.69.105 7.841.624 2.092 2.086 4.554 4.379 7.484a1.5 1.5 0 0 1 .104.151l2.176 3.617a1.5 1.5 0 0 1-.309 1.911l-22.54 19.339a1.5 1.5 0 0 1-1.97-.015l-1.54-1.363a1.5 1.5 0 0 1-.18-2.059l16.573-20.79a6.5 6.5 0 0 0-2.513-10.023l-27.12-11.67a1.5 1.5 0 0 1-.86-1.753l.607-2.349a1.5 1.5 0 0 1 1.745-1.096Z"/>
<path id="Path-3-Copy" fill-rule="nonzero" d="m77.662 59.418-.606 2.349a6.5 6.5 0 0 0 3.724 7.595l27.12 11.67a1.5 1.5 0 0 1 .58 2.313l-16.573 20.79a6.5 6.5 0 0 0 .775 8.92l1.54 1.363a6.5 6.5 0 0 0 8.54.066l22.54-19.339a6.5 6.5 0 0 0 1.338-8.284l-2.176-3.617a6.5 6.5 0 0 0-.451-.655c-1.942-2.48-3.115-4.457-3.525-5.831-.389-1.305-.4-3.155.026-5.53.009-.052.021-.103.036-.154l.88-3.021a5.572 5.572 0 0 0-4.263-7.023l-31.941-6.362a6.5 6.5 0 0 0-7.564 4.75Zm6.587.153 31.99 6.375a.572.572 0 0 1 .39.71l-.88 3.02c-.064.221-.116.444-.157.67-.552 3.083-.537 5.69.105 7.841.624 2.092 2.085 4.554 4.378 7.484a1.5 1.5 0 0 1 .105.151l2.176 3.617a1.5 1.5 0 0 1-.309 1.911l-22.54 19.339a1.5 1.5 0 0 1-1.97-.015l-1.541-1.363a1.5 1.5 0 0 1-.18-2.059l16.574-20.79a6.5 6.5 0 0 0-2.513-10.023l-27.12-11.67a1.5 1.5 0 0 1-.86-1.753l.607-2.349a1.5 1.5 0 0 1 1.745-1.096Z" transform="matrix(-1 0 0 1 204.42 0)"/>
</g>
</svg>
</xyba-analog>

Warzone

Inspired by the touch controls design of Warzone Mobile.

<xyba-analog class="warzone-analog" knob-offset="33%">
<div class="base" slot="base">
<svg class="direction-none" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
<defs>
<radialGradient id="base-a" cx="50%" cy="50%" r="100%" fx="50%" fy="50%">
<stop offset="0%" stop-color="currentColor" stop-opacity=".2"/>
<stop offset="100%" stop-color="transparent" stop-opacity="0"/>
</radialGradient>
</defs>
<circle cx="50" cy="50" r="49" fill="url(#base-a)" fill-rule="evenodd" stroke="currentColor" stroke-opacity=".489" stroke-width="2"/>
</svg>

<svg class="direction" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
<defs>
<radialGradient id="direction-b" cx="50%" cy="3.336%" r="74.851%" fx="50%" fy="3.336%" gradientTransform="rotate(-90.915 .494 .04) scale(1 1.39355)">
<stop offset="0%" stop-color="currentColor" stop-opacity=".232"/>
<stop offset="100%" stop-color="transparent" stop-opacity="0"/>
</radialGradient>
<linearGradient id="direction-a" x1="50%" x2="50%" y1="50%" y2="0%">
<stop offset="0%" stop-color="currentColor" stop-opacity="0"/>
<stop offset="100%" stop-color="currentColor" stop-opacity=".489"/>
</linearGradient>
</defs>
<circle cx="50" cy="50" r="49" fill="url(#direction-b)" fill-rule="evenodd" stroke="url(#direction-a)" stroke-width="2" />
</svg>
</div>
</xyba-analog>

Genesis

Digitized design inspired by the SEGA Genesis controller.

<xyba-analog no-style adapt class="genesis-analog" knob-offset="-28px">
<div class="base" slot="base">
<div class="dot arrow right"></div>
<div class="dot down_right"></div>
<div class="dot arrow down"></div>
<div class="dot down_left"></div>
<div class="dot arrow left"></div>
<div class="dot up_left"></div>
<div class="dot arrow up"></div>
<div class="dot up_right"></div>
<div class="inner"></div>
</div>
<div slot="knob" class="knob"></div>
</xyba-analog>

Coastal

Bulky and sharp design, inspired by: https://coastalworld.com/

<div class="area">
<xyba-analog relocate persistent track-from=".area" knob-offset="50%" no-style class="coastal-analog">
<div slot="base" class="base">
<div class="dot"></div>
</div>
<div slot="knob" class="knob"></div>
</xyba-analog>
<div class="indicator"></div>
</div>

Italy

A smooth and relaxed experience. Inspired by: https://dolceactivation.dolcegabbana.com/

<xyba-analog no-style knob-offset="-28px" adapt class="italy-analog">
<div slot="base" class="base">
<div class="arrow left"></div>
<div class="arrow up"></div>
<div class="arrow right"></div>
<div class="arrow down"></div>
</div>
<div slot="knob" class="knob"></div>
</xyba-analog>

Attached button

A
<xyba-analog relocate class="attachment-analog" capture></xyba-analog>
<xyba-button class="attachment-button" ignore-capture=".attachment-analog">A</xyba-button>