• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. Firefox OS apps
  5. Firefox OS Building Blocks
  6. Firefox OS 1.x building blocks
  7. Header

Header

In This Article
  1. Characteristics
  2. Visuals
    1. Default header
    2. Default: with cancel button
    3. Default: drawer
    4. Default: with inputs
    5. Default: disabled "create" button
    6. Default: edit mode
    7. Default: pressed "create" button
    8. Default: settings
    9. Default: pressed "back" button
    10. Default: settings subheader
  3. Interaction
  4. See also

A header labels the active view. In addition, it can contain top-level navigation and inputs for the active view. See the Coding guide for information on implementing headers in your apps.

Characteristics

  • A header is a horizontal bar the full width of the screen, which appears at the top of the screen in most apps.
  • Headers float above content, with the option of flowing with content in special instances, such as in the Browser app.
  • The heading's text provides the name of the current view.
  • The heading may optionally include additional text; for example, in an email app, the number of unread messages may be displayed.
  • Headers may include inputs for navigating and manipulating the current view.
  • Most apps (full-screen games being an obvious exception) have a header.

Visuals

Some guidelines for how headers should look and work:

Generic headers
Generic headers should have an orange background.
Headers in media contexts
Headers in media contexts (such as in video players, or camera or photo viewer apps) should have a dark grey background instead of orange.
Header actions
There are never more than two actions placed next to each other in a header.
Action positioning
Negative actions—such as cancel—are always placed on the left. Positive actions—such as "done" or "create"—are always placed on the right. Neutral actions—such as "add" and "edit" are placed in order of priority from right to left.

Default header

Default: with cancel button

Default: drawer

Default: with inputs

Default: disabled "create" button

When a button in the header is disabled, its foreground should be dimmed, without changing its background appearance, as seen here.

Default: edit mode

Default: pressed "create" button

When a button is pressed in the header, it should take on a blue appearance, as shown here.

Default: settings

Here's what a header with the dark grey "media context" background looks like.

Default: pressed "back" button

When a button is pressed in the header, it should take on a blue appearance, as shown here.

Default: settings subheader

The settings app uses subheaders for different sections of the settings options available; these look like this.

Interaction

The mockups below show some use cases for headers.

See also

  • Header coding guide
  • Firefox OS user experience

Document Tags and Contributors

Tags: 
  • Apps
  • B2G
  • Firefox OS
  • Firefox OS UX
  • UX
 Contributors to this page: chrisdavidmills, Sheppy
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:57:19 AM