Confirm 2.0 implementation

This article gives you all you need to implement v2.0 Gaia-style confimation dialogs in your own app.

Live sample

The following gives you an idea of what a simple confirm dialog would look like on Firefox OS 2.0.


Here is the code you'll need.


<link href="(your styles folder)/style/confirm.css" rel="stylesheet" type="text/css">

The CSS can be found in the Gaia project 2.0 branch under shared/style/confirm.css. Copy this into your own project, along with the associated resources.


Note: The CSS inside the <style> element isn't needed for the implementation: it is just for the purposes of this example.

<!doctype html>
  <link href="" rel="stylesheet" type="text/css">
  <link href="" rel="stylesheet" type="text/css">
    html, body {
      font-family: sans-serif;
      margin: 0;
      padding: 0;
      font-size: 10px;
      background-color: #fff;

    body {
      background: none;

<!-- Default confirm dialog -->
<form role="dialog" data-type="confirm">
    <h1>Confirmation</h1><!-- this heading is optional -->
    <p>Are you sure you want to delete this contact?</p>
    <button class="danger">Delete</button>


Note: Use <button type="button"> if you don't want your form to be submitted.