Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions submissions/examples/ease-attention-wiggle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ease-attention-wiggle

## What does it do?
Playful horizontal wiggle to grab the user's attention — friendlier and slower than a shake.

## Features
- `translateX` oscillation for a side-to-side wiggle
- 2–3 cycles (configurable via `animation-iteration-count`)
- CSS custom properties:
- `--ease-wiggle-amount` (default: 8px)
- `--ease-wiggle-speed` (default: 0.5s)
- Pure CSS, no JavaScript

## Usage
```css
.element {
animation: wiggle 0.5s ease-in-out 2;
}

@keyframes wiggle {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-8px); }
50% { transform: translateX(8px); }
75% { transform: translateX(-4px); }
}
```

## Browser Support
- Chrome 104+, Firefox 108+, Safari 14.1+

## Tech Stack
- HTML + CSS only, no JavaScript

## Preview
Open `demo.html` directly in browser.
36 changes: 36 additions & 0 deletions submissions/examples/ease-attention-wiggle/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ease-attention-wiggle — EaseMotion CSS</title>
<link rel="stylesheet" href="style.css">
<style>
body { padding: 2rem; background: #0f0f0f; color: #d1d5db; font-family: system-ui, sans-serif; max-width: 700px; margin: 0 auto; text-align: center; }
h1 { color: #ffffff; font-size: 1.75rem; margin-bottom: 0.25rem; }
p.subtitle { line-height: 1.7; margin-bottom: 2rem; color: #9ca3af; }
section { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
h2 { color: #ffffff; font-size: 1.1rem; margin: 0 0 0.75rem; }
.sec-desc { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1rem; }
.code-block { background: #2a2a2a; padding: 1rem; border-radius: 8px; text-align: left; overflow-x: auto; font-size: 0.85rem; color: #e5e7eb; }
code { background: #2a2a2a; padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
</style>
</head>
<body>
<h1>ease-attention-wiggle</h1>
<p class="subtitle">Playful horizontal wiggle to attract attention — friendlier than a shake.</p>

<section>
<h2>Demo</h2>
<p class="sec-desc">The card wiggles automatically on load</p>
<div class="wiggle-card">Look at me!</div>
</section>

<section>
<h2>Customization</h2>
<p>The wiggle can be tuned via CSS custom properties:</p>
<pre class="code-block">--ease-wiggle-amount: 8px;
--ease-wiggle-speed: 0.5s;</pre>
</section>
</body>
</html>
31 changes: 31 additions & 0 deletions submissions/examples/ease-attention-wiggle/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* ============================================================
EaseMotion CSS — ease-attention-wiggle
Playful horizontal wiggle to attract attention
============================================================ */

:root {
--ease-wiggle-amount: 8px;
--ease-wiggle-speed: 0.5s;
}

.wiggle-card {
width: 240px;
height: 120px;
margin: 1.5rem auto;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #6366f1, #a78bfa);
border-radius: 14px;
font-weight: 600;
color: #ffffff;
font-size: 1.1rem;
animation: wiggle var(--ease-wiggle-speed) ease-in-out 3;
}

@keyframes wiggle {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(calc(var(--ease-wiggle-amount) * -1)); }
50% { transform: translateX(var(--ease-wiggle-amount)); }
75% { transform: translateX(calc(var(--ease-wiggle-amount) * -0.5)); }
}
Loading