شعار Ui Patterns

Ui Patterns

المجتمع
alpham8
ui-patterns

طبّق أنماطًا مُجرّبة لمكوّنات واجهة المستخدم وسلوك تصفّح الصفحات لإنشاء واجهات فعّالة. استخدم هذه المهارة عندما تحتاج إلى: (1) تصميم التنقل والنماذج والأزرار والبطاقات والنوافذ المنبثقة والجداول، (2) فهم كيفية تصفّح المستخدمين للصفحات ووضع المحتوى بما يناسب ذلك، (3) الاختيار بين أنماط واجهة متنافسة (قائمة منسدلة أم أزرار اختيار، نافذة منبثقة أم محتوى مضمّن، عرض شرائح أم محتوى ثابت)، (4) إنشاء حالات التحميل والإشعارات وواجهات البحث. تكمل هذه المهارة gestalt-ui (التجميع البصري) وlaws-of-ux (المبادئ السلوكية) بإرشادات عملية على مستوى المكوّنات.

نظرة عامة

الناشرalpham8
المستودعagentic-webdev
اسم المهارةui-patterns
النجوم
4
التفريعات
0
الملفات المرفقة
3
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/alpham8/agentic-webdev/tree/master/skills/wondelai/ui-patterns
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alpham8/agentic-webdev.git /tmp/agentic-webdev
mkdir -p .claude/skills
cp -r /tmp/agentic-webdev/skills/wondelai/ui-patterns .claude/skills/ui-patterns
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

UI Patterns

Concrete, evidence-based patterns for building common UI components. This skill answers the question: "How should I build this specific component?"

For visual grouping theory, see gestalt-ui. For behavioural psychology laws, see laws-of-ux. For visual hierarchy and spacing systems, see refactoring-ui. For usability audits, see ux-heuristics.

Core Principle

Follow proven patterns. Innovate on value, not on interaction mechanics. Users spend most of their time on other sites (Jakob's Law). Every component you build should feel familiar unless you have strong evidence that a novel pattern is significantly better.

Scoring

Goal: 10/10. When reviewing or building components, rate 0-10 based on adherence to proven patterns.

  • 9-10: Every component follows established patterns. Scanning flow is optimised. Decision reference followed for all pattern choices.
  • 7-8: Most components are well-patterned. Minor issues: one unconventional choice, missing loading state.
  • 5-6: Mixed adherence. Some components feel right, others require learning or cause confusion.
  • 3-4: Significant pattern violations. Users struggle to predict behaviour.
  • 1-2: Components invented from scratch. Nothing feels familiar or predictable.

The UI Patterns Framework

1. Scanning Patterns -- How Users Actually Look at Pages

Core concept: Users don't read pages linearly -- they scan in predictable patterns. Place content where the eye naturally goes.

Why it works: Eye-tracking research reveals consistent scanning behaviours driven by reading habits and cognitive efficiency.

Key insights:

F-Pattern (Text-Heavy Pages)

The eye moves:

  1. Horizontal scan across the top (headline area)
  2. Shorter horizontal scan slightly below (subheading / first paragraph)
  3. Vertical scan down the left edge, looking for visual cues

Design rules for F-pattern pages:

  • First two paragraphs carry the most important information
  • Start headings and bullet points with information-carrying words ("Users" not "In the case of users")
  • Left-aligned content gets 2-3x more fixation than right-aligned
  • Break walls of text with bold keywords, headings, and bullet points
  • The F-pattern is the default when no visual cues exist -- good design breaks it
Z-Pattern (Minimal-Text Pages)

The eye moves: top-left → top-right → diagonal to bottom-left → bottom-right.

Design rules for Z-pattern pages:

  • Logo/brand: top-left
  • CTA or key action: top-right
  • Key message or value proposition: along the diagonal
  • Primary CTA or conversion action: bottom-right

Best for: landing pages, hero sections, splash screens, marketing pages.

Visual Weight Factors

Elements attract attention based on (strongest to weakest):

  1. Size -- larger elements dominate
  2. Colour and contrast -- vivid/saturated over muted
  3. Whitespace -- isolated elements gain prominence
  4. Shape -- distinctive shapes among uniform ones
  5. Position -- top-left dominance in LTR languages
  6. Imagery -- photos of people naturally attract the eye

Product applications:

ContextApplicationExample
Landing pagesZ-pattern with CTA bottom-rightHero image → headline → feature blocks → "Start free trial"
Blog / docsF-pattern with scannable headingsBold heading → summary → bulleted details → next heading
DashboardsTop-left for most critical KPIRevenue chart in top-left, secondary metrics below
Search resultsLeft-aligned titles, information-denseTitle (bold) → URL → description → metadata

See: references/scanning-patterns.md

2. Navigation Patterns

Core concept: Every page must answer three questions: (1) Where am I? (2) Where can I go? (3) Where have I been?

Why it works: Users need orientation, options, and history. Most responsive navigation handles only "where can I go?" and forgets the other two.

Key insights:

PatternUse whenAvoid when
Persistent top nav<= 7 items, flat hierarchyComplex multi-level structures
Simple toggle (hamburger)Single-level, many items on mobileMulti-level hierarchies
Multi-level toggle2-level hierarchy (sweet spot for most sites)> 2 levels of depth
Off-canvas / drawerComplex menus, mobile-firstDesktop with sufficient space
Tab bar (mobile)3-5 primary destinations> 5 items
SidebarMany sections, persistent access (apps, dashboards)Content-focused sites (blogs, marketing)

Product applications:

ContextApplicationExample
SaaS dashboardSidebar nav + top barSlack, Notion, Linear
E-commerceTop nav with categories + breadcrumbsProduct categories as top-level, breadcrumbs on product pages
Marketing siteSimple top nav (5-7 links)Home, Features, Pricing, Docs, Blog, Login
Mobile appBottom tab bar (4-5 tabs)Home, Search, Create, Notifications, Profile

Navigation rules:

  • Always label hamburger icons with "Menu" text -- icons alone are ambiguous
  • Show breadcrumbs at all viewport sizes, not just desktop
  • Build navigation progressively -- it must work without JavaScript
  • Current page indicator must remain visible in responsive navigation
  • No mega-menus on mobile; no more than 3 levels of nesting

See: references/navigation-forms.md

3. Form Patterns

Core concept: Forms are the highest-friction UI pattern. Every unnecessary field, confusing label, or validation delay reduces completion rates.

Why it works: Research shows most forms can remove 20-60% of their fields without impacting data quality. Perceived complexity reduces completion rates more than actual complexity.

Key insights:

Layout
  • Labels above fields -- always. Closest visual proximity.
  • One column for forms -- multi-column increases completion time by 15-25%
  • Group related fields with visible boundaries and tighter spacing within groups
  • Auto-focus the first field to reduce interaction cost
  • Size fields proportionally to expected input (postcode = short, address = long)
Input Optimisation
  • Match keyboard to input type: type="email", type="tel", type="number", type="date"
  • Use input masking for formatted data (phone, dates, credit cards)
  • Enable browser autocomplete / autofill (30% faster completion per Google research)
  • Show/hide password toggle instead of "confirm password" field
  • Avoid dropdowns on mobile -- prefer radio buttons, segmented controls, or steppers
Validation
  • Validate inline after the user leaves the field (on blur), not while typing
  • Show errors next to the field, not only in a top summary
  • Plain language: "Email must include @" not "Error: invalid format"
  • Never rely on colour alone for error indication -- add icons and text
  • Preserve user input when errors occur -- never clear fields on error
  • Show all errors at once, not one at a time
Friction Reduction
  • Remove every non-essential field
  • Explain why sensitive data is needed ("We need your phone for delivery updates")
  • Mark only optional fields (if most are required); use "Optional" text, not asterisks
  • Persist form data across accidental page reloads

Product applications:

ContextApplicationExample
SignupMinimal fields (email + password)Defer profile completion to after signup
CheckoutAuto-fill + address API + card scanningGoogle Places autocomplete, camera card capture
ContactName + email + message (3 fields)No phone, no company, no dropdown for "topic"
SettingsSection-by-section with inline saveEach section has its own "Save" button

See: references/navigation-forms.md

4. Button Patterns

Core concept: Buttons must look clickable, communicate their action, and follow a clear visual hierarchy.

Key insights:

Visual Hierarchy
LevelStyleExamples
PrimaryFilled, high contrast, strongest visual weight"Create Account", "Submit Order", "Get Started"
SecondaryOutlined or ghost, lower visual weight"Cancel", "Back", "Learn More"
TertiaryText-only, minimal visual weight"Skip", "Maybe Later", "Dismiss"
DestructiveDistinct colour (typically red), requires confirmation"Delete Account", "Remove Item"

Rule: Never give "Cancel" the same visual weight as "Submit". The primary action must dominate.

Sizing and Touch Targets
  • Minimum: 44x44 CSS pixels (10mm physical)
  • Primary action: largest button in context
  • Breathing room between adjacent buttons (minimum 8px, recommended 16px)
  • Full-width on mobile for primary actions
Labeling
  • Action verbs describing the outcome: "Create Account", "Send Message", "Download PDF"
  • Must answer: "What happens when I click this?"
  • Avoid: "OK", "Submit", "Yes/No", "Click Here"
Required States
  • Default -- resting appearance
  • Hover -- cursor feedback (desktop)
  • Active/Pressed -- click confirmation
  • Focused -- keyboard navigation indicator (never remove without replacement)
  • Disabled -- muted with explanation (prefer enabled + validate on submit)
  • Loading -- spinner or progress during async operations

5. Card Patterns

Core concept: Cards group heterogeneous content into discrete, scannable, often interactive units.

Key insights:

  • One primary action per card; secondary actions in overflow menu
  • Entire card clickable for the primary action (not just a "Read more" link)
  • Consistent dimensions within a grid (same height per row minimum)
  • Internal hierarchy: Image > Title > Description > Meta
  • Maximum 3-4 pieces of information per card

6. Modal & Dialog Patterns

Core concept: Modals interrupt flow and demand immediate attention. Use only when interruption is justified.

When to use: Destructive action confirmation, short decision-required forms, critical alerts.

When NOT to use: Informational content, long forms, marketing/upsells, errors (use inline).

Rules:

  • Always provide visible close button (X) AND Escape key
  • Dim/blur the background (figure-ground separation)
  • Focus trap: tab cycling stays within the modal
  • Return focus to trigger element on close
  • Never stack modals
  • Mobile: consider full-screen or bottom sheet instead of centred modal

7. Loading State Patterns

Core concept: Every async operation needs appropriate feedback based on its duration.

DurationPatternExample
< 100msNo indicatorDirect manipulation (toggle, click)
100-400msSubtle indicatorButton state change, micro-animation
400ms-2sSpinner or skeletonContent loading, navigation
2-10sProgress bar + percentageFile upload, data processing
> 10sProgress + status messages"Generating report... Analysing data..."

Skeleton screens:

  • Mirror the layout of the content being loaded
  • Subtle shimmer/pulse animation
  • Replace with real content progressively (no flash)
  • Better than spinners for content-heavy pages

8. Notification Patterns

TypePersistencePositionUse case
ToastAuto-dismiss (3-5s)Top-right or bottomSuccess confirmations, non-critical info
BannerPersistent until dismissedTop of page/sectionSystem messages, warnings
InlinePersistentNext to source elementValidation errors, field-level feedback
ModalRequires user actionCentre overlayDestructive action confirmation

Rules:

  • Success notifications auto-dismiss; errors persist until acknowledged
  • Errors always colour-independent (icon + text, not just red colour)
  • Stack multiple notifications vertically, don't overlap
  • Include an action when recovery is possible ("Undo", "Retry")

Pattern Decision Reference

When choosing between competing patterns, use this table:

DecisionChoose AChoose BWhy
Hamburger vs visible navVisible when space allowsHamburger on mobile onlyHidden nav reduces discoverability by 50%+
Dropdown vs radio buttons (mobile)Radio / segmented controlDropdown only for 10+ optionsDropdowns need 2 taps and hide options
Placeholder vs labelAlways visible labelsNever placeholder-onlyPlaceholders disappear (recognition > recall)
Modal vs inlineInline when possibleModal only for interruptionModals interrupt flow; require focus management
Carousel vs staticStatic contentCarousel only for media galleries< 1% interaction past first slide
Infinite scroll vs paginationPagination for goal-oriented tasksInfinite scroll for browsing/feedsPagination preserves position and back button
Icon-only vs icon + labelIcon + labelIcon-only for universal icons (X, search, home)Most icons are ambiguous without text
Confirm password vs toggleShow/hide toggleNever confirm passwordSingle field + toggle reduces errors
Disabled button vs enabledEnabled + validate on submitDisabled only with visible explanationDisabled buttons don't explain what's wrong
Skeleton vs spinnerSkeleton for content loadingSpinner for actions (submit, search)Skeletons reduce perceived wait time
Bottom sheet vs modal (mobile)Bottom sheet for selections/actionsModal for critical confirmationsBottom sheets are thumb-friendly and dismissible
Tabs vs accordionTabs when sections are equal priorityAccordion for progressive disclosureTabs show all labels; accordions save space

Common Mistakes

MistakeWhy It FailsFix
Form labels as placeholdersLabels disappear on focusAlways use visible labels above inputs
Multi-column forms15-25% slower completionUse single-column layout
Validate while user is still typingPremature errors frustrate and distractValidate on blur (when user leaves field)
Icon-only navigation without labelsUsers can't predict meaningAdd text labels to all navigation icons
Equal-weight Cancel and Submit buttonsUsers click the wrong onePrimary action gets strong visual weight; secondary gets weak
Carousel for important content< 1% see past first slideUse static layout or prioritise content
Modal for non-critical informationUnnecessary interruptionUse inline content, banners, or tooltips
No loading feedback for actions > 400msUsers think the system is brokenAdd spinners, skeletons, or optimistic UI

Quick Diagnostic

QuestionIf NoAction
Does every page answer "Where am I?"Missing current location indicatorAdd active nav state, breadcrumbs, or page title
Do forms use labels above fields (not placeholders)?Recognition violationAdd persistent labels
Is there exactly one primary CTA per view?Competing actionsDemote secondary actions to outlined/text style
Do all async actions show feedback within 400ms?Doherty violationAdd loading states appropriate to duration
Are dropdown menus avoided on mobile?Hick's Law + frictionReplace with radio buttons or segmented controls
Can users dismiss modals with X, Escape, and backdrop click?Control violationAdd all three dismissal methods

Reference Files

Further Reading

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

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

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

ماذا تفعل مهارة الذكاء الاصطناعي Ui Patterns؟

طبّق أنماطًا مُجرّبة لمكوّنات واجهة المستخدم وسلوك تصفّح الصفحات لإنشاء واجهات فعّالة. استخدم هذه المهارة عندما تحتاج إلى: (1) تصميم التنقل والنماذج والأزرار والبطاقات والنوافذ المنبثقة والجداول، (2) فهم كيفية تصفّح المستخدمين للصفحات ووضع المحتوى بما يناسب ذلك، (3) الاختيار بين أنماط واجهة متنافسة (قائمة منسدلة أم أزرار اختيار، نافذة منبثقة أم محتوى مضمّن، عرض شرائح أم محتوى ثابت)، (4) إنشاء حالات التحميل والإشعارات وواجهات البحث. تكمل هذه المهارة gestalt-ui (التجميع البصري) وlaws-of-ux (المبادئ السلوكية) بإرشادات عملية على مستوى المكوّنات.

لماذا تستخدم Ui Patterns على TypingMind؟

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

كيف أثبّت Ui Patterns في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/alpham8/agentic-webdev/tree/master/skills/wondelai/ui-patterns. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Ui Patterns؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Ui Patterns؟

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

هل مهارة الذكاء الاصطناعي Ui Patterns مجانية؟

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

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

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

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

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

عرض الكل

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

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