Info Bar Templates for Web and Mobile
What an info bar is
An info bar is a slim, horizontally oriented UI element that communicates short, contextual messages (notifications, tips, status, promotions, consent banners) without interrupting the user’s task.
When to use one
- Urgent but low-effort updates (outages, maintenance notices)
- Contextual tips or onboarding hints
- Cookie/privacy consent or legal notices
- Promotions or time-limited offers
- Status indicators (syncing, offline mode)
Key design patterns (templates)
- Persistent top bar — Sits at the top of the viewport, visible across pages; ideal for global alerts (e.g., site-wide maintenance).
- Sticky bottom bar — Affixed to the bottom; common for consent banners or call-to-action buttons on mobile.
- Inline contextual bar — Appears within page content near the related element; good for task-specific tips or errors.
- Temporary toast-style bar — Slides in/out with auto-dismiss; best for non-critical confirmations.
- Expandable compact bar — Shows a short line with an affordance to expand for more detail or actions.
Content & messaging guidelines
- Be concise: 5–12 words for main message; optional short supporting sentence.
- Clear action: Use a single primary CTA or dismiss control.
- Prioritize accessibility: Ensure keyboard focusability, aria roles, readable contrast, and screen-reader announcements.
- Respect space on mobile: Keep height small (40–64px typical) and avoid overlapping essential controls.
Visual & interaction guidelines
- Contrast and hierarchy: Use a distinct background color for the bar and a contrasting CTA color.
- Animation: Use subtle slide/fade transitions; avoid motion that causes layout shift.
- Dismissal options: Provide explicit close, optional “Learn more” or secondary action.
- Behavior rules: Auto-dismiss non-critical bars after 4–8 seconds; persistent bars require explicit dismissal or user action.
Accessibility checklist
- Role=“status” or role=“alert” for appropriate announcements.
- Focus trap avoidance — do not block page navigation.
- Visible focus styles for interactive elements.
- Respect prefers-reduced-motion preference.
- Ensure text contrast ratio ≥ 4.5:1 (AA) for body text.
Implementation tips (web & mobile)
- Web: Use CSS position: fixed; avoid layout shifts by reserving space or overlaying content with proper z-index. Use ARIA live regions for announcements.
- Mobile: Prefer bottom sticky bars for thumb reach; test across devices and safe-area insets (notch / home indicator).
- Use feature flags or A/B tests for messaging and CTA placement.
Example copy snippets
- “We’re under maintenance. Expected back in 30 minutes. [Learn more] [Dismiss]”
- “New feature: Save to favorites. Try it now →”
- “You’re offline — working offline until you reconnect.”
- “Accept cookies to improve your experience. [Accept] [Manage]”
Quick checklist before shipping
- Is the message concise and actionable?
- Does it respect accessibility and motion preferences?
- Is the CTA clear and single-focused?
- Will it display correctly on small screens and safe-area insets?
- Is dismissal behavior reasonable (auto vs persistent)?
If you want, I can generate ready-to-use HTML/CSS/JS snippets for any of the templates above — tell me which template and platform.
Leave a Reply