探花视频

Skip to main content

Buttons

Buttons can be positioned in the Main-Left, Main-Right, Right Sidebar sections of the page, or added to a Grid layout. All you need to do for this content type is enter the button text and set a link for the button. Then select the button style and decide where you want to place it on the page.

You can use buttons to link to another section in T4, specific content in a section, to an external web site, or to a T4 media file (i.e. image, pdf, or doc).

Button styles

There are only three options for the Background Color field: Primary, Secondary, and Tertiary.

If you are doing custom buttons, please use only the following three button styles. Do not apply other Bootstrap button styles, such as success, info, warning, and danger, or the "-outline" styles.

  • Primary (btn-primary): the main action you want visitors to take.
  • Secondary (btn-secondary): a supporting action, often next to a primary button.
  • Tertiary (btn-tertiary): the lowest priority action, especially when presenting multiple options.

Each style adjusts automatically on a dark background, as the examples below show.

Button style examples

Button sizes

Buttons come in three sizes. A regular button needs no size class. For a large or small button, add btn-lg or btn-sm next to the style class. Sizes are set in the HTML of a link, such as in a General Content item's source code. The Buttons content type always uses the regular size.

Large (btn-lg)

<a class="btn btn-primary btn-lg" href="...">Primary</a>
<a class="btn btn-secondary btn-lg" href="...">Secondary</a>
<a class="btn btn-tertiary btn-lg" href="...">Tertiary</a>

Regular (no size class)

<a class="btn btn-primary" href="...">Primary</a>
<a class="btn btn-secondary" href="...">Secondary</a>
<a class="btn btn-tertiary" href="...">Tertiary</a>

Small (btn-sm)

<a class="btn btn-primary btn-sm" href="...">Primary</a>
<a class="btn btn-secondary btn-sm" href="...">Secondary</a>
<a class="btn btn-tertiary btn-sm" href="...">Tertiary</a>

Square buttons

Use square buttons when the links are not a primary or secondary call to action, but a directory: a way to list informative links, such as offices, resources, or related pages. Add btn-square to a btn-primary or btn-secondary button when creating custom buttons.

A square button fills the width of its container, aligns its label to the left, has small rounded corners, and has no arrow. Place square buttons in columns to build the list.

Square buttons can be primary or secondary. When you lay out a grid of square buttons, use either all primary or all secondary buttons; do not mix the two in one grid.

Primary square buttons

<div class="row">
  <div class="col-sm-6 mb-3">
    <a class="btn btn-primary btn-square" href="...">Registrar</a>
  </div>
  <div class="col-sm-6 mb-3">
    <a class="btn btn-primary btn-square" href="...">Library</a>
  </div>
</div>

Secondary square buttons

<div class="row">
  <div class="col-sm-6 mb-3">
    <a class="btn btn-secondary btn-square" href="...">Registrar</a>
  </div>
  <div class="col-sm-6 mb-3">
    <a class="btn btn-secondary btn-square" href="...">Library</a>
  </div>
</div>

External links

Add btn-external to a button that links outside the scu.edu domain. It turns the button's arrow up and to the right, so visitors know the link will take them away from scu.edu. Primary and secondary buttons show the arrow when they are hovered or focused; tertiary buttons always show it.

The class can be dropped in on any button: keep the button's style and size classes as they are and add btn-external. Square buttons have no arrow, so btn-external does not change them.

<a class="btn btn-primary btn-external" href="...">Primary</a>
<a class="btn btn-secondary btn-external" href="...">Secondary</a>
<a class="btn btn-tertiary btn-external" href="...">Tertiary</a>

With a size class, add it the same way:

<a class="btn btn-secondary btn-sm btn-external" href="...">Small</a>