Search results

4.1 Labels

Labels should be used to indicate status of an object or to deliver contextual information that is secondary in relation to a primary piece of content (for example, showing that an exception is tracked or that a project is on hold).
When using a label to convey a message to the user, ensure that the label is consistently applied: If 'On hold' uses a warning label in one part of the platform, it should do so elsewhere.
Use the default label style unless a specifically positive or negative connotation is desired. Labels should always be displayed using a consistent size.

Examples
.label-default
Use this to convey neutral status or context information.
Label
.label-success
Used to convey completion.
Label
.label-warning
Used to convey something that is temporarily on hold or blocked.
Label
.label-danger
Indicates something that is urgent or needs immediate attention.
Label
<span class="label [modifier class]">Label</span>
4.1.1 Badges

Badges are used to indicate counts of to-do items, available results, and so on. Generally these shouldn't take precedence over the navigation elements they usually sit next to - only use the emphasis classes to draw the user's eye in special cases (like a new or overdue item).

Examples
.badge-default
The default.
99
.badge-primary
Use this to indicate new, changed, or highlighted content.
99
.badge-danger
Use this when a user's action is needed, as with overdue items.
99
<span class="badge [modifier class]">99</span>
4.1.3 Alerts

When a user triggers an action, they should see a confirmation of their action. Alerts are the most frequent type of confirmation feedback, and should be used whenever a form is submitted or whenever an object is added, removed, moved, etc. Alerts will appear in a fixed position at the top right of the screen. The proper ‘level’ of the notification should be based on its content.

Examples
.alert-success
Used to confirm successful operations.
.alert-danger
Used for error messages only
.alert-warning
Used for partially successful actions (like 'some rows could not be imported'), or when an action is successful but a user should be warned about a potentially unexpected outcome.
.alert-info
Use for messages unrelated to user actions, e.g. to notify them that the data on a page has changed, or that they've been assigned a new task, etc.
<div class="feedback-element alert [modifier class]" role="alert"> <button type="button" class="close feedback-element-close" aria-label="Close"><span >×</span></button>Message goes here.</div>
4.1.4 Callouts

Callouts should be used to draw a user's attention to a specific section of the page. These should be used sparingly, generally no more than one per page. Don't use these as decorative elements.
Callouts are used to indicate announcements and messages from Lumere to the user. They are preferred to wells for this purpose. Don't use them for error or success messages.
Also used for the product facts box and people results within search.
Titles are optional.
An icon may be added to the left side of the callout for additional emphasis.

Examples
.bs-callout-primary
Used for primary, important announcements

Title

Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.

.bs-callout-default
Used for secondary or contextual announcements & information

Title

Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.

.bs-callout-success
Use to notify users of successful actions, or to harmonize with green-colored UI elements

Title

Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.

.bs-callout-danger
Used to warn the user of potentially destructive actions

Title

Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.

.bs-callout-glyphicon
supplemental class to help align a glyphicon on the left side of the callout

Title

Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.

<div class="bs-callout [modifier class]">
    <h4>Title</h4>
    <p>Etiam porta sem malesuada magna mollis euismod. Curabitur blandit tempus porttitor. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor.</p>
</div>
4.1.5 Cards

Cards are a standard interaction pattern for the display and inline editing of data within the solution. The following standards should be applied when creating them:

  • If using a card, apply standard card styling. If making an editable section, ensure that the editable content within is clearly delineated visually on the page.
  • Place the 'Edit' button in the top right. When clicked, this should toggle edit mode (clicking while edit mode is active is equivalent to clicking the cancel link). The Edit button should not disappear when edit mode is active.
  • Standard 'Save or cancel' controls should be placed in a well at the bottom of the editable card/section.
  • To the extent possible, maintain the placement of labels, data, and controls between the edit and view modes.
  • If an object can be deleted, deletion should occur via a 'Delete this (object)' checkbox that appears when edit mode is active.
    • When the delete checkbox is toggled to on, the 'Save' buton's text should change to read 'Delete (object)' and it should receive a button-danger class.
  • Save and delete actions within an editable section should only affect the data present in that card/section, not other data on the page.
Example

Use `panel-heading` class

And `panel panel-default` for the container. `panel-body` is for the main section text.
    <div class="panel panel-default">
        <h4 class="panel-heading">Use `panel-heading` class</h4>
        <div class="panel-body">And `panel panel-default` for the container. `panel-body` is for the main section text.</div>
    </div>
4.1.6 Ribbons

Ribbons are used to summarize metrics and key performance indicators at the top of a page and are intended to provide a high-level overview of the detailed information below.

  • Individual metrics within a ribbon can be links to more detail, but this shouldn't be a primary navigation mechanism.

When displaying currency in a ribbon, always use our standard decimal and abbreviation conventions:

  • $0–$9.99 : Display using 2 decimal places
  • $10–$99,999 : Display whole number using zero decimals
  • $100,000–$999,999 : Display as K value with zero decimals, ie. 112K
  • $1,000,000 and up : Display as M value with two decimals, ie. $1.52M
<div class="ribbon clearfix">
        <div class="ribbon-section pull-left">
            <div class="clearfix">
                <h5 class="metrics-header no-margin">Opportunities</h5>
                <ul class="metrics-list pipeline-metrics">
                    <li class="metric-container"><a href="#"><span class="metric">0</span><span class="metric-label">Open exceptions <br>for Apr 2016</span></a></li>
                    <li class="metric-container"><a href="#"><span class="metric">1/5</span><span class="metric-label">Tracked exceptions <br>on target</span></a></li>
                    <li class="metric-container"><a href="#"><span class="metric">10</span><span class="metric-label">Open strategic <br>opportunities</span></a></li>
                </ul>
            </div>
        </div>
        <div class="ribbon-section ribbon-separator pull-left">
            <div class="clearfix">
                <h5 class="metrics-header no-margin">Evaluation activity</h5>
                <ul class="metrics-list">
                    <li class="metric-container" id="average-request"><a href="#"><span class="metric">810</span><span class="metric-label">Avg. request<br>age in days</span></a></li>
                </ul>
            </div>
        </div>
</div>
4.1.7 Tables

Tables are used extensively throughout our application. In many cases, they may serve as a syntactically appropriate structure for elements that contain table-like data: for example, the product facts box used in product profiles. This section does not cover those special cases—it only addresses the typical ‘Table with a capital T’ elements found in the solution.

  • Tables should have the .table class applied.
  • Also apply the .table-striped class unless the design specifies otherwise.
  • It is best to create a table initially using fully automatic layout (no preset column widths).
  • Non-paginated tables should be given a fixed height
  • When column width adjustments are necessary, adjust one column at a time. Always apply widths using percentages, not pixels.
  • Don’t add additional columns just to constrain adjacent elements (for example, product photo and product name). Use markup inside the cell to accomplish that instead.
  • When filters apply to a table, the filters should act as a header for the table and contain the table within a common element. See Filters.
  • When buttons are used within a table, add the .btn-sm class to the button so that its size is proportionate with the rest of the type in the table.
Table headers
  • If a column’s header label is wider than the data itself, prefer making the column narrower (and having the label wrap) over reserving space just for the label when space is at a premium.
  • When multiple header rows are needed, apply the .table-context-header class to cells in the first row requiring a shared border.
  • Sortable table headers should display with an underline to indicate that they are clickable.
  • The header row should be sticky such that it is visible regardless of how far a user scrolls down the table
Numbers in tables

Numeric columns should be right-justified, along with their headers. Use tabular figures for numeric data in tables:

font-variant-numeric: tabular-nums;
-moz-font-feature-settings: "tnum";
-webkit-font-feature-settings: "tnum";
font-feature-settings: "tnum";

  • Numbers above 999 should include commas.
  • For currency, display cents if the value is between $10 and -$10, unless it is $0.
  • When displaying percentages rounded to the nearest whole number, use the follwing rules:
    • For numbers between 1%–100%, round up to the nearest whole number if the value is >= .5% and down if the value is < .5%.
    • For numbers between 0%–1%:
      • If the value = 0%, display 0%
      • Else if the value <= 0.5%, display 'Less than 1%'
      • Else if the value > 0.5% and <= 1%, display 1%
Example
Name Location Sortable column Next meeting Dollar value
Eugene Oregon Something good -- $8,345.12
Madison Wisconsin Not bad -- $8,345.12
Logan Utah Fluffy cat -- $8,345.12
Savannah Georgia Happy dog -- $8,345.12
Alexandria Virginia Pet turtle 10/12/2018 $8,345.12
Elizabeth New Jersey N/A -- $8,345.12
<table class="table table-striped">
    <thead>
        <tr>
            <th><a href="#">Name</a></th>
            <th>Location</th>
            <th><a href="#">Sortable column</a></th>
            <th>Next meeting</th>
            <th>Dollar value</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Eugene Oregon</td>
            <td></td>
            <td>Something good</td>
            <td>--</td>
            <td class="number-column">$8,345.12</td>
        </tr>
        <tr>
            <td>Madison Wisconsin</td>
            <td></td>
            <td>Not bad</td>
            <td>--</td>
            <td class="number-column">$8,345.12</td>
        </tr>
        <tr>
            <td>Logan Utah</td>
            <td></td>
            <td>Fluffy cat</td>
            <td>--</td>
            <td class="number-column">$8,345.12</td>
        </tr>
        <tr>
            <td>Savannah Georgia</td>
            <td></td>
            <td>Happy dog</td>
            <td>--</td>
            <td class="number-column">$8,345.12</td>
        </tr>
        <tr>
            <td>Alexandria Virginia</td>
            <td></td>
            <td>Pet turtle</td>
            <td>10/12/2018</td>
            <td class="number-column">$8,345.12</td>
        </tr>
        <tr>
            <td>Elizabeth New Jersey</td>
            <td></td>
            <td>N/A</td>
            <td>--</td>
            <td class="number-column">$8,345.12</td>
        </tr>
    </tbody>
</table>
4.2 Tooltips

Tooltips are the most basic 'popup' component and should be used for displaying additional contextual information when only a small amount of information is needed.

  • Tooltips cannot contain styled/formatted content or interaction. If either are needed, use a popover instead.
  • Tooltip content should be limited in length, preferably no more than a sentence.
  • Top positioning is preferred and should be considered the default.
  • The data-toggle="tooltip" attribute is what applies the tooltip, from ph.js
Example
<a data-toggle="tooltip" title="Why, sometimes I've believed as many as six impossible things before breakfast.">Hover me</a>
4.2.1 Tooltips

Non standard placements

  • Should be used sparingly, the top placement is the default
Example
<a data-toggle="tooltip" data-placement="right" title="This is on the right and should be used sparingly">Hover me</a>
4.2.2 Popovers

Popovers are more robust than tooltips, but smaller and less obtrusive than modals, and should be preferred to modals when the user is editing a small number of data elements or when formatted contextual information needs to be displayed.

  • Popovers can contain editing controls, whereas tooltips can't.
  • Popovers, unlike modals, do not use a transparent overlay that covers the screen background.
  • A popover's location should be relative to the data being modified, but should not cover that data if possible. Top positioning is preferred and should be considered the default.
  • Popovers do not require a title.
  • Clicking anywhere outside of a popover should close it, as if the 'Cancel' link had been clicked.
  • Don't use a popover for an 'Are you sure?' message - use a modal in that situation instead.
  • Popovers should float over the side nav but under the top nav.
Example
<a class="demo-popover" data-toggle="popover" title="Bottom popover" data-placement="top" data-content="Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.">Click me!</a>
4.2.4 Modals

Modal windows, if used inappropriately, can be a usability hindrance, but in the appropriate circumstances they can aid the user’s efficiency by allowing focused interaction without disrupting their primary workflow.

  • Don’t use modals for multi-step workflows.
  • If there’s information displayed on the page (or present elsewhere) that the user needs to help them complete the task, make sure it’s also included in the modal. Don’t rely on the user’s recall regarding information they were presented before.
  • Modals should always include a close icon and should be closable by clicking into the shaded area outside of the modal itself.
  • If a user has entered data into a text input or text area, show an unsaved changes warning before closing the modal in this fashion.
  • Avoid making modals scroll by constraining their height to ~700px. If more space is needed, consider whether a modal is right for the job.
  • Modals should be centered horizontally and positioned 30px from the top edge of the viewport.
  • If the modal has to load content from elsewhere, make sure the ‘wait’ interaction is triggered.
Example
<div role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <a class="close" data-dismiss="modal" aria-hidden="true">&times;</a>
                <h3>This is a modal heading</h3>
            </div>
            <div class="modal-body">
                <p style="margin-bottom: 100px">And the modal body.</p>
            </div>
            <div class="modal-footer form-actions">
                <div class="pull-left">
                    <button type="submit" class="btn btn-success">Save</button> or <a href="#" data-dismiss="modal" aria-hidden="true">cancel</a>
                </div>
            </div>
        </div>
    </div>
</div>
4.5 Images
  • Use the most appropriately sized image as required by the design: the original image resolution should match the CSS-enforced resolution as closely as possible.
  • Use the thumbnail_url template tag to return an appropriately-sized image:
    • thumbnail_url: "small" (150x150px)
    • thumbnail_url: "medium" (270x270px)
    • thumbnail_url: "large" (up to 800x800px depending on original file)
  • If scaling is required, always prefer to scale down rather than up.
  • In some cases a 2x resolution image may be desired for additional quality on HiDPI devices.
  • When an image is displayed in a square frame (as in a product image), it should be scaled proportionally to fit the longest dimension, never stretched.
4.5.1 Product images

Showing an image in tandem with a product and brand name is far and away the most common use of images in our solution. The product image/name/brand combination forms a discrete module that should always be displayed the same way.

  • The product image and name should always be links to the product profile.
  • Product images should always be square and be displayed with a border.
  • Brand name / Manufacturer name (if present) should always display as small muted text.
  • If the product and/or brand name
  • Hovering over the product image or name should always trigger the universal product popover.
  • Exception: if a product is displayed within a modal, the link can optionally be removed. The product popover should never be displayed over a modal.
  • When products appear in this format, they may appear next to products that don't have an image. In this case, the products without images should be left-aligned with the images- there shuldn't be empty space where the image would otherwise appear.
  • If notification exists for the product, it should be using a bell icon that displays the notification in a tooltip when hovered.
<div class="product-widget with-image">
    <a href="/research/products/524/" data-productid="524" class="product-popover-trigger product-image right-space-tiny">
        <img src="https://lumere-dev.s3.amazonaws.com/images/products/524.png.150x150_q85.jpg" class="img-sq-40">
    </a>
    <div class="product-details">
        <a href="/research/products/524/" data-productid="524" class="product-popover-trigger">XIENCE Xpedition Everolimus Eluting Coronary Stent System</a>
        <i data-toggle="tooltip" class="glyphicons glyphicons-bell" title="The XIENCE Xpedition was discontinued in December 2015."></i>
        <div class="muted small">Abbott Laboratories</div>
    </div>
</div>
4.6 Vector images

Non-photographic images such as logos and custom icons should be served as SVG files whenever possible. Because certain legacy browsers do not render SVG files properly, a PNG fallback is necessary. Therefore, vector images should be deployed using the following method:

<img src="logo.png" srcset="logo.svg">

This will ensure that browsers supporting srcset will display the SVG file, whereas those that will not will display the PNG.