apple-design
ما الذي تفعله
تنقل هذه المهارة مبادئ من محاضرات تصميم Apple إلى واجهات الويب. وهي للمطورين والمصممين الذين يريدون أن تبدو تفاعلات السحب والتمرير والأوراق الجانبية طبيعية ومتجاوبة.
متى تستخدمها
- ✓عندما تبني واجهة تعتمد على الإيماءات أو تراجعها، مثل السحب أو التمرير أو الورقة الجانبية.
- ✓عندما تريد حركات نابضة يمكن مقاطعتها وتغيير اتجاهها.
- ✓عندما تحتاج إلى دعم الحركة المخفّضة أو تحسين الخطوط والمواد.
رابط المهارة
https://github.com/spree/spree/blob/main/.agents/skills/apple-design/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اجعل هذه الورقة السفلية تتبع إصبعي، وتحمل زخمها، وتبدو طبيعية عندما أرفع إصبعي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يطبّق وكيلك مجموعة مبادئ: تبدأ الحركة من القيمة الحالية على الشاشة، وتحافظ على سرعة المستخدم، ويمكن الإمساك بها وعكسها في أي لحظة. يستخدم النوابض وأحداث الإدخال في الويب لتحقيق ذلك.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Apple Design
How Apple builds interfaces that stop feeling like a computer and start feeling like an extension of you. This knowledge comes from Apple's WWDC design talks — chiefly Designing Fluid Interfaces (WWDC 2018) — distilled and translated into the web platform (CSS, Pointer Events, requestAnimationFrame, spring libraries like Motion/Framer Motion).
The through-line: an interface feels alive when motion starts from the current on-screen value, inherits the user's velocity, projects momentum forward, and can be grabbed and reversed at any instant. Springs are the tool that makes all of this natural, because they are inherently interruptible and velocity-aware.
The Core Idea
"When we align the interface to the way we think and move, something magical happens — it stops feeling like a computer and starts feeling like a seamless extension of us."
An interface is fluid when it behaves like the physical world: things respond instantly, move continuously, carry momentum, resist at boundaries, and can be redirected mid-motion. Everything below is a way to get closer to that.
Apple frames design as serving four human needs: safety/predictability, understanding, achievement, and joy. Every rule here serves one of them.
1. Response — kill latency
The moment lag appears, the feeling of directness "falls off a cliff." Response is the foundation everything else is built on.
- Respond on pointer-down, not on release. Highlight a button the instant it's pressed. Waiting for
click/touch-up to show feedback feels dead. - Be vigilant about every latency. Audit debounces, artificial timers, transition waits, and the ~300ms tap delay. Anything on the input path that isn't essential is a regression.
- Feedback must be continuous during the interaction, not just at the end. For a drag, slider, or drawer, update the UI 1:1 with the pointer the whole way through — never animate only when the gesture completes.
/* Feedback lives on the press, and it's instant */
.button:active {
transform: scale(0.97);
transition: transform 100ms ease-out;
}
2. Direct manipulation — 1:1 tracking
"Touch and content should move together."
When the user drags something, it must stay glued to the finger — and respect the offset from where they grabbed it. Snapping to the element's center on grab breaks the illusion immediately.
- Use Pointer Events with
setPointerCaptureso tracking continues even when the pointer leaves the element's bounds. - Track a short velocity/position history (last few
pointermoveevents), not just the current point — you'll need velocity at release.
el.addEventListener('pointerdown', (e) => {
el.setPointerCapture(e.pointerId);
const grabOffset = e.clientY - el.getBoundingClientRect().top; // respect where they grabbed
// ...track position + timestamp history for velocity
});
3. Interruptibility — the single most important principle
"The thought and the gesture happen in parallel."
Every animation must be interruptible and redirectable at any moment. A user must be able to grab a moving element mid-flight and reverse it without waiting for the animation to finish. A closing modal the user grabs again should follow the finger — not finish closing first, then reopen.
- Never lock out input during a transition.
- Always animate from the presentation (current) value, never the target value. On interrupt, read the element's live on-screen transform and start the new animation from there. Starting from the logical/target value causes a visible jump.
- Avoid CSS transitions and
@keyframesfor anything gesture-driven — they can't be smoothly grabbed and reversed mid-flight. Springs animate from the current value by default, which is exactly what interruption needs. - When a gesture reverses, blend velocity — don't hard-cut it. Replacing one animation with another at a reversal creates a velocity discontinuity, a "brick wall." Spring libraries that carry velocity through a re-target avoid it. (This is what iOS's additive animations do natively; on the web, choose a spring library that re-targets from the current velocity.)
- Decompose 2D motion into independent X and Y springs. A single spring on a 2D distance desyncs when X and Y have different velocities.
4. Behavior over animation — use springs
"Think of animation as a conversation between you and the object, not something prescribed by the interfac
الأسئلة الشائعة
هل هذا للأجهزة من Apple فقط؟
لا. تُترجم مبادئ Apple التصميمية إلى أدوات الويب مثل CSS وPointer Events ومكتبات النوابض.
ماذا تعني قابلة للمقاطعة؟
يمكن الإمساك بالحركة وعكسها في منتصفها، بدلاً من أن تنتهي أولاً.
هل تغطي الحركة المخفّضة؟
نعم. تتضمن المهارة إرشادات لإعدادات الحركة المخفّضة.
التفاصيل
الوصف الأصلي من المؤلف
Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.
repo: spree/spree
الشعبية
- نجوم GitHub
- 16k
- الترتيب
- #10874
- الترخيص
- BSD-3-Clause
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
animate
16kيبني الحركة من الصفر، فيقرر أولاً هل ينبغي أن يتحرك العنصر أصلاً، ثم يختار غرضها وتوقيتها ومنحناها قبل كتابة الكود.
animation-vocabulary
16kيحوّل وصفاً غامضاً لحركة أو تأثير حركي إلى اسمه التقني الدقيق، لتعرف ما تطلبه بالضبط.
find-animation-opportunities
16kيبحث في الواجهة عن أماكن تستفيد من الحركة ويرفض الباقي. يعطي قائمة قصيرة باقتراحات حركة دقيقة دون أن يغيّر الكود.
improve-animations
16kيراجع حركات الكود في المشروع ويكتب خططاً مرتبة بالأولوية يستطيع وكيل آخر تنفيذها. يكتب خططاً فقط، ولا يغيّر الكود المصدري.
مهارات مشابهة
canvas
394kيتيح لوكيلك عرض أداة مرئية مستضافة على لوحة Mac متصلة، ثم إخفاء اللوحة أو نقلها إلى صفحة أخرى.
control-ui
394kيساعد وكيلك على تنظيم واجهة OpenClaw Control UI واستكشاف أخطائها، بما في ذلك الجلسات ولوحات المعلومات وبوابات Gateway المتصلة.
diagram-maker
394kيساعد وكيلك على إنشاء مخططات واضحة بصيغة SVG أو HTML أو Excalidraw قابلة للتعديل، للعمليات وبنية الأنظمة والرسومات على السبورة.