شعار Smooth Option Switcher

Smooth Option Switcher

المجتمع
zhoulinhua0-star
smooth-option-switcher

Implement smooth mutually exclusive option selectors with CSS radio states and moving indicators, including a nested plan/billing selector that expands a compact submenu. Use for pricing plans, monthly/yearly billing, view modes, or segmented configuration controls. Adapt the demonstrated interaction to the project's UI system.

نظرة عامة

الناشرzhoulinhua0-star
المستودعsmooth-option-switcher
اسم المهارةsmooth-option-switcher
النجوم
20
التفريعات
0
الملفات المرفقة
9
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 9

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها zhoulinhua0-star على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Smooth Option Switcher في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/zhoulinhua0-star/smooth-option-switcher/tree/main/skills/smooth-option-switcher
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhoulinhua0-star/smooth-option-switcher.git /tmp/smooth-option-switcher
mkdir -p .claude/skills
cp -r /tmp/smooth-option-switcher/skills/smooth-option-switcher .claude/skills/smooth-option-switcher
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Smooth Option Switcher في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Smooth Option Switcher تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Smooth Option Switcher بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Smooth Option Switcher

Implement the source-based CSS interaction in the bundled reference. Its distinctive form is a Free/Premium selector whose Premium subtitle expands into Monthly/Annual controls, with a second indicator inside the main one. A plain two- or multi-option control is an adaptation, not the full demonstrated component.

Start with the project

Inspect the target's components, styling tokens, typography, motion conventions, framework, form/state patterns, and browser targets. Reuse those conventions. Do not impose the reference's monochrome palette, font, pill shape, shadows, or fixed demo dimensions.

Use this pattern for a small set of mutually exclusive choices where a traveling indicator helps show selection. Use the nested form only when a secondary choice genuinely belongs to one primary option. Avoid it for independent toggles, action buttons, large/wrapping option lists, or navigation that needs links. Use tab semantics only for actual tab panels.

Read the reference

Preserve the interaction

Four native radios precede the visual wrapper: two independent groups for the primary mode and billing version. Their order matters to chained :checked ~ selectors. Labels activate them; no JS is needed for the canonical interaction.

The main content is absolutely positioned over a normal-flow indicator occupying half the padded track. Changing mode translates that indicator by its own width (translateX(100%)). The full-size Premium label initially sits above the compact submenu, so a click anywhere on that half selects Premium first.

The submenu stays mounted. Its top: 66%; left: 50%; translate(-50%, -50%) scale(0.6) state becomes top: 0; left: 0; translate(0, 0); gap: 0. Premium fades and moves down by 10px, scaling to 0.7, while its stacking order drops to expose the submenu. The secondary indicator is an actual absolutely positioned element, 48% wide and 80% high, animated with left, not a substituted transform technique. The dot collapses; selected text changes color. Returning to Free collapses the menu and retains the billing selection.

Preserve persistent indicators, continuous reversible transitions, equal segment geometry, stacking/hit targets, and synchronized text changes. The observed easing is cubic-bezier(0.34, 0.96, 0.6, 0.99). The reference preserves the observed 0.1s Free text transition, 0.3s Premium transition, and 0.5s selected billing text transition. Its other 0.5s transitions are explicitly reconstructed, not transcribed. Tune timing for the existing motion system without replacing the coordinated expansion with an unrelated animation.

Do not add hover-driven selection, remount indicators on change, flatten the nested interaction without a product reason, or introduce an animation library solely for this effect. No pseudo-elements or CSS variables are required by the observed code. Adding design tokens in a target project is appropriate.

Adapt and verify

Customize colors, contrast, fonts, labels, spacing, dimensions, radii, and shadows through existing tokens. Scope IDs and radio names per instance; coordinate track padding, content geometry, and indicator endpoints when changing sizes. Keep the original reference unchanged when implementing a project adaptation.

Use existing framework state only for application integration, preserve native input semantics where practical, and keep animation in CSS. The canonical hidden inputs intentionally preserve the demonstration and are not keyboard accessible: implement the production guidance before shipping.

Verify all states, both switching directions, rapid reversals, remembered secondary selection, pointer hit targets, keyboard/focus behavior, reduced motion, narrow containers, long labels, and multiple instances. Check intermediate motion as well as endpoints. Report reconstructed details and actual verification limits honestly.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Smooth Option Switcher؟

Implement smooth mutually exclusive option selectors with CSS radio states and moving indicators, including a nested plan/billing selector that expands a compact submenu. Use for pricing plans, monthly/yearly billing, view modes, or segmented configuration controls. Adapt the demonstrated interaction to the project's UI system.

لماذا تستخدم Smooth Option Switcher على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Smooth Option Switcher عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Smooth Option Switcher في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/zhoulinhua0-star/smooth-option-switcher/tree/main/skills/smooth-option-switcher. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Smooth Option Switcher؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Smooth Option Switcher؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Smooth Option Switcher معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Smooth Option Switcher مجانية؟

نعم. نشرها zhoulinhua0-star على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇