Check
View on GitHub

Title bars

Documentation and examples for Boosted’s exclusive Brand responsive title bars.

How it works

A title bar is designed to display the title of a page and shall be placed right below an Innovation Cup navbar.

Being based on spacing and backgrounds utilities, title bars were designed to take 100vw width.

See them in action in our examples page.

Background color

To change the appearance of a title bar, use our background utilities.

Title bars can be displayed with black, white or supporting backgrounds. Illustrations can be included as an option, but aren’t necessary.

The image should not overlap on title and the title shouldn’t wrap. If this happens, please transform your title bar into one without any image.

Title

Title

Title

html
<div class="bg-white title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
  </div>
</div>

<div class="mt-3"></div>

<div class="bg-dark title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
  </div>
</div>

<div class="mt-3"></div>

<div class="bg-supporting-green title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
    <picture>
      <source media="(min-width:1440px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1440.png">
      <source media="(min-width:1280px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1280.png">
      <source media="(min-width:1024px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1024.png">
      <source media="(min-width:768px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-768.png">
      <source media="(min-width:480px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-480.png">
      <source media="(min-width:320px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-320.png">
      <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-320.png" alt="">
    </picture>
  </div>
</div>

Images

Several options are available to add an image in a title bar.

srcset attribute

We strongly recommend to use srcset attribute as it is well supported by browsers and allows you to load an image depending on the user’s device. However, it might introduce a delay to display the image while resizing.

Title

html
<div class="bg-supporting-pink title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
    <picture>
      <source media="(min-width:1440px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1440.png">
      <source media="(min-width:1280px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1280.png">
      <source media="(min-width:1024px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1024.png">
      <source media="(min-width:768px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-768.png">
      <source media="(min-width:480px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-480.png">
      <source media="(min-width:320px)" srcset="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-320.png">
      <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-320.png" alt="">
    </picture>
  </div>
</div>

HTML <svg> tag

Title

html
<div class="bg-supporting-purple title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
    <svg aria-hidden="true" focusable="false" width="1.8em"><use xlink:href="/innovation-cup/docs/0.2/assets/img/boosted-sprite.svg#document"/></svg>
  </div>
</div>

HTML <img> tag

Title

html
<div class="bg-supporting-green title-bar">
  <div class="container-xxl">
    <h1 class="display-1">Title</h1>
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-320.png" alt="" class="d-sm-none">
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-480.png" alt="" class="d-none d-sm-block d-md-none">
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-768.png" alt="" class="d-none d-md-block d-lg-none">
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1024.png" alt="" class="d-none d-lg-block d-xl-none">
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1280.png" alt="" class="d-none d-xl-block d-xxl-none">
    <img src="/innovation-cup/docs/0.2/assets/img/title-bars-illustrations/illustration-1440.png" alt="" class="d-none d-xxl-block">
  </div>
</div>

Background image

To include a background image in a title bar, it is required to use the background shorthand CSS property in some extra CSS that you can see on our examples page.

CSS

Variables

Title bars use local CSS variables on .title-bar for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.

  --#{$prefix}title-bar-image-ratio: #{$title-bar-image-ratio};
  --#{$prefix}title-bar-padding-y: #{$title-bar-padding-y};
  --#{$prefix}title-bar-font-size: #{$title-bar-font-size};
  --#{$prefix}title-bar-line-height: #{$title-bar-line-height};
  --#{$prefix}title-bar-letter-spacing: #{$title-bar-letter-spacing};
  --#{$prefix}title-bar-border-width: #{$title-bar-border-width};
  --#{$prefix}title-bar-border-color: #{$title-bar-border-color};
  

Sass variables

$title-bar-image-ratio:             1.8em;
$title-bar-padding-y:               .3333333em;
$title-bar-font-size:               $h2-font-size;
$title-bar-line-height:             $display-line-height;
$title-bar-letter-spacing:          $h2-spacing;
$title-bar-border-width:            $border-width * .5;
$title-bar-border-color:            $gray-500;

$title-bar-font-size-md:            $display2-size;
$title-bar-letter-spacing-md:       $display2-spacing;

$title-bar-font-size-xl:            $display1-size;
$title-bar-letter-spacing-xl:       $display1-spacing;

$title-bar-border-color-dark:       $gray-700;