I rebuilt the macOS Genie minimise for the web.
It's as close to the real one as I could get, with a bit of my own taste on top so it looks nicer on the web.
It also works with Base UI's components.
how it works 📚
an invisible scroller drives rotation with css scroll-driven animation
only the front of the ball gets built and revealed
this clip breaks it down ↓
css tip: 𝚊𝚝𝚊𝚗𝟸() is a pretty interesting CSS function.
It calculates the angle between two coordinates 📐
You can use it to make an element point towards the cursor without manually calculating angles in JavaScript.
.𝚊𝚛𝚛𝚘𝚠 {
𝚛𝚘𝚝𝚊𝚝𝚎: 𝚊𝚝𝚊𝚗𝟸(𝚟𝚊𝚛(--���𝚢), 𝚟𝚊𝚛(--𝚍𝚡));
}
Here, --𝚍𝚡 and --𝚍𝚢 represent the cursor's offset from the element.
Update those values as the cursor moves, and the arrow follows its direction.
Pretty neat for directional interactions, cursor-following elements and radial interfaces.
新栏目《999 个小技巧,让你 Vibe 的产品更有质感》
001–005 都在我主页,关注我,每天一个让产品更有质感的小技巧
✨ 005 更灵动的拖拽排序
做横向或纵向的拖拽排序时,让落点两侧的元素轻轻让开,并且由近及远依次启动,动作会更像真实世界里的推挤。
Prompt 附在最后,可以直接抄 ⬇️
要点:
1. 光标及时反馈:悬停时变成手指,按下时变成抓手;
2. 落点用一条插入线提示:出现时从中间轻轻展开,拖动时跟着移到新的落点;
3. 插入线两侧的元素向外避让,离得越近,让得越多、动得越早:
位移 = 10px × 0.7ⁿ
延迟 = 24ms × n
(n 是与插入线相隔的层数,紧挨着的为 0)
可以直接喂给 AI 的部分:
Make drag-to-reorder in my product feel like this. Apply it to the lists,
rows and docks I name, and reuse any drag helper the project already has.
1. Cursor: a pointing hand over anything draggable, a grabbing hand while
dragging.
2. Lift: the picked item follows the pointer, raised off the list so it
never hides where it will land: above a horizontal row, or pulled aside
and shrunk to about 90% in a vertical list. Its old slot closes up.
3. Drop hint: a faint, thin line in the gap where it will land (vertical in
a row, horizontal in a list), about 15% of the text color. It grows from
its middle when it appears and glides to each new gap. No line over the
item's own slot.
4. Ripple: items on both sides of the line lean away from it. Counting n
from the line (0 = the item touching it), item n moves
A x 0.7^n (A is about 10px for icons, 8px for cards)
and starts 24ms x n later, on a quick spring that barely overshoots and
settles in about 0.25s. Nearer items move sooner and further, so the
push spreads out like a ripple.
5. Drop: the item takes the gap and every item springs into its new place.
Escape or dropping outside the list cancels, and everything springs back.
6. Give each motion its own curve (hand-like for the pointer, a small pop
for the lift, springs for settling) instead of one ease-out everywhere.
Move things with transforms, not layout. Let the keyboard reorder too, and
with reduced motion keep only the line.
Matching border radii don't mean matching corners.
I built concentric to fix that for @tailwindcss
Add rounded-concentric to the child. It calculates the radius from the parent's radius, padding and border.
https://t.co/IcB05RT1wP
The best UI component libraries worth bookmarking🔖
https://t.co/86hFc2NsFt — Ready-to-use Tailwind components for faster UI development.
https://t.co/lH2N4uAuDZ — Interactive React animations for polished, modern interfaces.
https://t.co/l6yZHvM3B3 — AI-ready UI components built for modern products.
https://t.co/fEakbX0jEh — Free, polished React and Next.js components ready to copy and customize.
https://t.co/1uhAvIzHwH — Smooth transitions for fluid, modern interfaces.
https://t.co/KILmsWEXQS — Clean, beautiful components for next-gen products.
https://t.co/SIWZPhsJvG — Beautiful, accessible React components built with Tailwind CSS.
https://t.co/4lqCMV2XK6 — Premium animated components for standout web apps.
What other UI libraries deserve a spot on this list? 👇
design engineering tip straight from @jamdotdev repo
if you are using drag selection, ramp the scroll speed based on cursor position (closer to the edge = faster)
we use this simple formula:
-> scrollSpeed = 12 * (1 - distanceToEdge / 48)
quick design engineering tip we use at @jamdotdev
when an interactive element appears or disappears near an edge, add these two lines of css:
- transform: scale(0.96) -> on :active
- filter: blur(8px) -> slide & fade out
feels like you applied force and pushed element out
Prompt of the day:
/writing-for-agents my AGENTS.md is a hot mess, propose a series of restructurings that:
- Remove no-ops
- Use progressive disclosure
- Move instructions to CODING_STANDARDS.md
Apply your work over three subagents, each more radical than the last. Create a single PR.
AGENTS.md is the most common source of token inefficiency. This prompt kills it dead.
the safe triangle is one of those things you never notice until it's missing.
move diagonally toward a submenu and you cross other items. without it, the menu jumps to whatever you pass over.