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
32 changes: 32 additions & 0 deletions submissions/examples/ease-nod/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ease-nod

## What does it do?
Element bobs downward then back up, like nodding in agreement. One-shot 0.4s animation perfect for confirmation micro-interactions.

## Features
- `translateY(0) → translateY(6px) → translateY(0)`
- One-shot animation (runs once per hover)
- 0.4s ease-in-out timing
- Pure CSS, no JavaScript

## Usage
```css
.element:hover {
animation: nod 0.4s ease-in-out;
}

@keyframes nod {
0% { transform: translateY(0); }
50% { transform: translateY(6px); }
100% { transform: translateY(0); }
}
```

## Browser Support
- Chrome 1+, Firefox 3.5+, Safari 3.1+

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

## Preview
Open `demo.html` directly in browser.
34 changes: 34 additions & 0 deletions submissions/examples/ease-nod/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ease-nod — 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.5rem; }
.sec-desc { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1rem; }
code { background: #2a2a2a; padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
</style>
</head>
<body>
<h1>ease-nod</h1>
<p class="subtitle">Subtle vertical nod — like nodding in agreement. Great for confirmation micro-interactions.</p>

<section>
<h2>Demo</h2>
<p class="sec-desc">The card nods once on hover</p>
<div class="nod-card">Yes!</div>
<p style="color:#6b7280;font-size:0.8rem;margin-top:1rem;">Hover again to replay.</p>
</section>

<section>
<h2>How It Works</h2>
<p>A one-shot <code>translateY(0) → translateY(6px) → translateY(0)</code> animation triggered by <code>:hover</code>, running for 0.4s.</p>
</section>
</body>
</html>
29 changes: 29 additions & 0 deletions submissions/examples/ease-nod/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* ============================================================
EaseMotion CSS — ease-nod
Subtle vertical nod animation
============================================================ */

.nod-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;
cursor: pointer;
}

.nod-card:hover {
animation: nod 0.4s ease-in-out;
}

@keyframes nod {
0% { transform: translateY(0); }
50% { transform: translateY(6px); }
100% { transform: translateY(0); }
}
Loading