Skip to content
← Ease-In / Ease-Out
Edit Ease-In / Ease-Out
Name
Also known as (comma separated)
Brief definition
Easing that accelerates in / decelerates out.
Notes
Tier
Core
Useful
Reference
Deleted
Controls schema (JSON array)
[ { "id": "phase", "type": "select", "label": "Phase", "default": "ease-in", "options": [ "ease-in", "ease-out" ] }, { "id": "duration", "type": "number", "label": "Duration (ms)", "default": 1200, "min": 400, "max": 3000, "step": 100 }, { "id": "loop", "type": "toggle", "label": "Loop", "default": true }, { "id": "accent", "type": "color", "label": "Colour", "default": "#A8E6C1", "presets": [ "#A8E6C1", "#F5C2E0", "#BFD9F2", "#D9C8F0", "#E8A020", "#241430" ] } ]
Templates (JSON object keyed by format)
{ "html": "<div class=\"mot-eio-stage\" data-phase=\"{{phase}}\">\n <svg viewBox=\"0 0 60 60\" width=\"60\" height=\"60\" aria-hidden=\"true\">\n <path d=\"M4,4 L4,56 L56,56\" fill=\"none\" stroke=\"#24143033\" stroke-width=\"1.5\"/>\n <path class=\"mot-eio-curve mot-eio-curve--in\" d=\"M4,56 C30,56 40,20 56,4\" fill=\"none\" stroke=\"{{accent}}\" stroke-width=\"3\"/>\n <path class=\"mot-eio-curve mot-eio-curve--out\" d=\"M4,56 C4,20 30,4 56,4\" fill=\"none\" stroke=\"{{accent}}\" stroke-width=\"3\"/>\n </svg>\n <div class=\"mot-eio-track\">\n <span class=\"mot-eio-dot{{#if loop}} mot-eio-dot--loop{{/if}}\" style=\"background:{{accent}};\"></span>\n </div>\n <p class=\"mot-eio-caption\">{{phase}}: {{#if loop}}slow at the {{/if}}start or end of the move</p>\n</div>\n<style>\n.mot-eio-stage { width: 100%; max-width: 320px; padding: 16px; background: #FAF7F2; border: 1px solid #24143022; border-radius: 12px; font: 13px system-ui, sans-serif; color: #241430aa; }\n.mot-eio-curve { display: none; }\n[data-phase=\"ease-in\"] .mot-eio-curve--in, [data-phase=\"ease-out\"] .mot-eio-curve--out { display: block; }\n.mot-eio-track { position: relative; height: 24px; background: #24143014; border-radius: 999px; margin-top: 10px; }\n.mot-eio-dot { position: absolute; top: 1px; left: 1px; width: 22px; height: 22px; border-radius: 999px; }\n.mot-eio-caption { margin: 8px 0 0; }\n@media (prefers-reduced-motion: no-preference) {\n .mot-eio-dot { animation-duration: {{duration}}ms; animation-name: mot-eio-slide; }\n [data-phase=\"ease-in\"] .mot-eio-dot { animation-timing-function: ease-in; }\n [data-phase=\"ease-out\"] .mot-eio-dot { animation-timing-function: ease-out; }\n .mot-eio-dot--loop { animation-iteration-count: infinite; }\n @keyframes mot-eio-slide { 0%,100% { left: 1px; } 50% { left: calc(100% - 23px); } }\n}\n</style>", "tailwind": "<div class=\"w-full max-w-[320px] p-4 bg-[#FAF7F2] border border-[#24143022] rounded-xl font-sans text-sm text-[#241430]/70\" data-phase=\"{{phase}}\">\n <svg viewBox=\"0 0 60 60\" width=\"60\" height=\"60\" aria-hidden=\"true\">\n <path d=\"M4,4 L4,56 L56,56\" fill=\"none\" stroke=\"#24143033\" stroke-width=\"1.5\"/>\n <path class=\"tw-eio-curve tw-eio-curve--in\" d=\"M4,56 C30,56 40,20 56,4\" fill=\"none\" stroke=\"{{accent}}\" stroke-width=\"3\"/>\n <path class=\"tw-eio-curve tw-eio-curve--out\" d=\"M4,56 C4,20 30,4 56,4\" fill=\"none\" stroke=\"{{accent}}\" stroke-width=\"3\"/>\n </svg>\n <div class=\"relative h-6 bg-[#24143014] rounded-full mt-2.5\">\n <span class=\"absolute top-px left-px w-[22px] h-[22px] rounded-full{{#if loop}} tw-eio-loop{{/if}}\" style=\"background:{{accent}};\"></span>\n </div>\n <p class=\"mt-2\">{{phase}}: {{#if loop}}slow at the {{/if}}start or end of the move</p>\n</div>\n<style>\n.tw-eio-curve { display: none; }\n[data-phase=\"ease-in\"] .tw-eio-curve--in, [data-phase=\"ease-out\"] .tw-eio-curve--out { display: block; }\n@media (prefers-reduced-motion: no-preference) {\n [data-phase=\"ease-in\"] span { animation-timing-function: ease-in; }\n [data-phase=\"ease-out\"] span { animation-timing-function: ease-out; }\n span { animation-name: mot-eio-tw-slide; animation-duration: {{duration}}ms; }\n .tw-eio-loop { animation-iteration-count: infinite; }\n @keyframes mot-eio-tw-slide { 0%,100% { left: 1px; } 50% { left: calc(100% - 23px); } }\n}\n</style>", "react": "export function EaseInEaseOut({\n phase = \"{{phase}}\",\n duration = {{duration}},\n loop = {{loop}},\n accent = \"{{accent}}\",\n}) {\n const path = phase === \"ease-in\" ? \"M4,56 C30,56 40,20 56,4\" : \"M4,56 C4,20 30,4 56,4\";\n return (\n <div data-phase={phase} style={{ width: \"100%\", maxWidth: 320, padding: 16, background: \"#FAF7F2\", border: \"1px solid #24143022\", borderRadius: 12, fontFamily: \"system-ui, sans-serif\", fontSize: 13, color: \"#241430aa\" }}>\n <svg viewBox=\"0 0 60 60\" width=\"60\" height=\"60\" aria-hidden=\"true\">\n <path d=\"M4,4 L4,56 L56,56\" fill=\"none\" stroke=\"#24143033\" strokeWidth=\"1.5\" />\n <path d={path} fill=\"none\" stroke={accent} strokeWidth=\"3\" />\n </svg>\n <div style={{ position: \"relative\", height: 24, background: \"#24143014\", borderRadius: 999, marginTop: 10 }}>\n <span className={loop ? \"dot dot--loop\" : \"dot\"} style={{ position: \"absolute\", top: 1, left: 1, width: 22, height: 22, borderRadius: 999, background: accent }} />\n </div>\n <p style={{ margin: \"8px 0 0\" }}>{phase}: {loop ? \"slow at the \" : \"\"}start or end of the move</p>\n <style>{`\n @media (prefers-reduced-motion: no-preference) {\n .dot { animation: mot-eio-slide ${duration}ms ${phase} 1; }\n .dot--loop { animation-iteration-count: infinite; }\n @keyframes mot-eio-slide { 0%,100% { left: 1px; } 50% { left: calc(100% - 23px); } }\n }\n `}</style>\n </div>\n );\n}" }
Save
History