@@ -593,6 +593,49 @@ <h1 class="page-title">Alerts</h1>
593593 <!-- Right Panel -->
594594 < div class ="right-panel ">
595595
596+
597+ <!-- Guidelines -->
598+ < div class ="guidelines ">
599+ < div class ="guidelines-header "> 📚 HIG Guidelines</ div >
600+ < div class ="guidelines-body ">
601+ < div class ="do-dont ">
602+ < div class ="do-card ">
603+ < h4 > ✓ Do</ h4 >
604+ < ul >
605+ < li > Use alerts only for important information that requires acknowledgment</ li >
606+ < li > Keep alert titles short and descriptive</ li >
607+ < li > Use a two-button alert for decisions</ li >
608+ < li > Place the preferred action on the trailing side (right)</ li >
609+ < li > Use destructive style for actions that delete or remove data</ li >
610+ < li > Use Cancel to let people abandon the action</ li >
611+ </ ul >
612+ </ div >
613+ < div class ="dont-card ">
614+ < h4 > ✗ Don't</ h4 >
615+ < ul >
616+ < li > Don't use alerts for non-essential information</ li >
617+ < li > Don't overuse alerts — they interrupt the user's flow</ li >
618+ < li > Don't use an alert when an action sheet is more appropriate</ li >
619+ < li > Don't include more than 3 buttons in a single alert</ li >
620+ < li > Don't use vague titles like "Error" or "Warning"</ li >
621+ < li > Don't use "Yes" / "No" — use descriptive verb labels</ li >
622+ </ ul >
623+ </ div >
624+ </ div >
625+ < p class ="guideline-note ">
626+ Alerts communicate important information that requires acknowledgment or a decision.
627+ They appear centered on screen with a dimmed background overlay.
628+ Use alerts sparingly — only for situations that truly require the user's immediate attention,
629+ such as confirming a destructive action or reporting a critical error.
630+ For < strong > 2 buttons</ strong > , they appear side by side horizontally.
631+ For < strong > 3 or more buttons</ strong > , they stack vertically.
632+ </ p >
633+ < a href ="https://developer.apple.com/design/human-interface-guidelines/alerts " class ="guideline-link " target ="_blank ">
634+ Apple HIG: Alerts →
635+ </ a >
636+ </ div >
637+ </ div >
638+
596639 <!-- Controls -->
597640 < div class ="controls-panel ">
598641 < div class ="controls-header "> ⚙️ Controls</ div >
@@ -641,47 +684,6 @@ <h1 class="page-title">Alerts</h1>
641684 < div class ="code-preview-body " id ="codePreview "> </ div >
642685 </ div >
643686
644- <!-- Guidelines -->
645- < div class ="guidelines ">
646- < div class ="guidelines-header "> 📚 HIG Guidelines</ div >
647- < div class ="guidelines-body ">
648- < div class ="do-dont ">
649- < div class ="do-card ">
650- < h4 > ✓ Do</ h4 >
651- < ul >
652- < li > Use alerts only for important information that requires acknowledgment</ li >
653- < li > Keep alert titles short and descriptive</ li >
654- < li > Use a two-button alert for decisions</ li >
655- < li > Place the preferred action on the trailing side (right)</ li >
656- < li > Use destructive style for actions that delete or remove data</ li >
657- < li > Use Cancel to let people abandon the action</ li >
658- </ ul >
659- </ div >
660- < div class ="dont-card ">
661- < h4 > ✗ Don't</ h4 >
662- < ul >
663- < li > Don't use alerts for non-essential information</ li >
664- < li > Don't overuse alerts — they interrupt the user's flow</ li >
665- < li > Don't use an alert when an action sheet is more appropriate</ li >
666- < li > Don't include more than 3 buttons in a single alert</ li >
667- < li > Don't use vague titles like "Error" or "Warning"</ li >
668- < li > Don't use "Yes" / "No" — use descriptive verb labels</ li >
669- </ ul >
670- </ div >
671- </ div >
672- < p class ="guideline-note ">
673- Alerts communicate important information that requires acknowledgment or a decision.
674- They appear centered on screen with a dimmed background overlay.
675- Use alerts sparingly — only for situations that truly require the user's immediate attention,
676- such as confirming a destructive action or reporting a critical error.
677- For < strong > 2 buttons</ strong > , they appear side by side horizontally.
678- For < strong > 3 or more buttons</ strong > , they stack vertically.
679- </ p >
680- < a href ="https://developer.apple.com/design/human-interface-guidelines/alerts " class ="guideline-link " target ="_blank ">
681- Apple HIG: Alerts →
682- </ a >
683- </ div >
684- </ div >
685687
686688 </ div >
687689</ div >
0 commit comments