The Yale UI Component Library was made to help designers and developers build interfaces that adhere to Yale’s usability, visual identity, and accessibility guidelines.

Getting Started

  1. Download the compiled assets OR install the compiled assets via npm with
npm install yale-ui-component-library

Within the folder, you’ll find the following directories with the compiled and minified CSS and JavaScript:

   +-- css/
       +-- yale-ui.css
       +-- yale-ui.min.css
   +-- js/
       +-- yale-ui-scripts.js
       +-- yale-ui-scripts.min.js
  1. Add the CSS and JS to your project’s asset folder.

  2. Include the CSS and JS as part of your project. (Note: You’ll have to also include the jQuery, Popper.js, and Bootstrap scripts separately and in that order.)

  <!-- ... -->
  <link rel="stylesheet" href="assets/css/yale-ui.css">
  <!-- ... -->
  <!-- ... -->
  <script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous";></script>
  <script src="" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  <script src="" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  <script src="assets/js/yale-ui-scripts.js"></script>

Adding Yale Fonts

The UI Component Library uses the Mallory and YaleNew fonts, with Verdana being the fallback font for Mallory and Georgia being the fallback font for YaleNew. Information on Mallory and YaleNew fonts


A limited license for Mallory OpenType fonts may be requested by designated Yale graphic designers and vendors for Yale projects. Mallory Web fonts may be used for official Yale Web sites.

To add the Mallory font to your project, add the font to your fonts folder and add a CSS file with the following @font-face rules:

@font-face {
    font-family: "Mallory";
    src: url("fonts/Mallory/Mallory/Mallory-Light.woff") format("woff"),
         url("fonts/Mallory/Mallory/Mallory-Light.woff2") format("woff2");
       font-weight: normal;
    font-style: normal;
@font-face {
    font-family: "Mallory-Medium";
    src: url("fonts/Mallory/Mallory/Mallory-Medium.woff") format("woff"),
         url("fonts/Mallory/Mallory/Mallory-Medium.woff2") format("woff2");
       font-weight: normal;
    font-style: normal;


YaleNew is the official serif font for Yale websites.

To add the YaleNew font to your project, add the font to your fonts folder and add a CSS file with the following @font-face rules:

@font-face {
    font-family: "yalenew";
    src: url("fonts/YaleNew/YaleNew-normal-normal/yalenew-roman-webfont.eot");
    src: url("fonts/YaleNew/YaleNew-normal-normal/yalenew-roman-webfont.eot?#iefix") format("embedded-opentype"),
         url("fonts/YaleNew/YaleNew-normal-normal/yalenew-roman-webfont.woff2") format("woff2"),
         url("fonts/YaleNew/YaleNew-normal-normal/yalenew-roman-webfont.woff") format("woff"),
         url("fonts/YaleNew/YaleNew-normal-normal/yalenew-roman-webfont.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
@font-face {
	font-family: "yalemarks";
	src: url("fonts/YaleNew/YaleNew-marks/yalemarks-webfont.eot");
	src: url("fonts/YaleNew/YaleNew-marks/yalemarks-webfont.eot?#iefix") format("embedded-opentype"),
		 url("fonts/YaleNew/YaleNew-marks/yalemarks-webfont.ttf") format("truetype"),
		 url("fonts/YaleNew/YaleNew-marks/yalemarks-webfont.woff") format("woff"),
		 url("fonts/YaleNew/YaleNew-marks/yalemarks-webfont.svg#yalenewmarks") format("svg");
	font-weight: normal;
	font-style: normal;

Working With Source Files

We use Gulp to build all of our files and Yarn to handle our dependencies. If you wish to work with the source files, first run yarn in your command line to download the required node modules. To rebuild the project assets after working with the source files, run gulp in your command line.


We would love to have you contribute to this project! Email to discuss!

Extending the UI Component Library

The UI Component Library was designed to be extensible. Custom development projects at Yale should extend this project where possible (and contribute improvements back to the project so that all Yale developers may benefit).

The project itself can be included in your Node.js project through such methods as npm install <url> or yarn add <url>. The UI Component Library comes with an example-project folder with sample gulpfile.js and main.scss files to help you get started. For most projects, this would entail creating your own .scss file and declaring the variables from the Yale UI Component Library that you want to override. Below those declarations, import the Yale UI main.scss file.

Libraries and Dependencies


This UI style guide is largely built on Bootstrap 4.3. Where possible, we maintained or slightly altered Bootstrap’s default styles. Because web accessibility is a strong driver for this project, we enhanced, reimplemented, or removed parts of Bootstrap that do not facilitate conformance with Yale’s Web Accessibility Policy.

Noteworthy pieces of Bootstrap that we have not and may not include in the component library:

  • Scrollspies
  • Toasts

Developers who wish to recompile the UI Component Library to include these assets are responsible for ensuring they are usable and accessible.

Bootstrap Re-implementations

We have re-implemented the following parts of Bootstrap to be more appropriate for our purposes:

  • Alerts
  • Text and Background Utilities
  • List Groups
  • Buttons
  • Tables
  • Progress Bars
  • Breakpoints

In all of these cases, we strove to keep the API broadly similar to Bootstrap, so users who are comfortable with Bootstrap will hopefully find the transition easy.

Bootstrap vs Yale UI Component Library


We do not use Bootstrap’s Alerts component, but implement our own with increased color contrast. The documentation for Bootstrap Alerts is applicable. Additional accessibility requirements can be found under Alerts.

Text and Background Utilities

We implement Bootstrap’s Utilities as is, with some exceptions described below. The documentation for Bootstrap Utilities is generally applicable.


There are several differences between Bootstrap’s text utilities and the Yale UI Component Library’s:

  • We offer additional font family classes
  • To generate text color variants, we use our own mixin, yale-text-emphasis-variant rather than Bootstrap’s text-emphasis-variant. Our variant tries to ensure sufficient color contrast accessibility.
  • We do not include .text-black-50 or .text-white-50 from Bootstrap.
  • We add .text-base-size, which resets the text’s font size and line height.
Background Styles

To generate background styles, we use the mixin, accessible-bg-variant, rather than Bootstrap’s bg-variant. The accessible-bg-variant mixin will set the text, heading, and link color to either white or black (depending on the color contrast ratio of the text with the selected background color).

Examples and further information can be found under Utilities

List Groups

We do not use Bootstrap’s List Group component. We implement our list groups with fewer features. In particular, we do not implement contextual classes for list groups. We also do not implement Bootstrap’s tabs JavaScript. Otherwise, the documentation for Bootstrap List Groups is applicable.


We do not use Bootstrap’s Buttons component, but implement our own with increased color contrast. Full implementation and accessibility guidance can be found under Buttons


The Yale UI Component Library does not include Bootstrap’s _tables.scss file. Instead, we include more simple table styles. Future work on tables may come depending on community feedback. Bootstrap’s tables documentation will not be helpful. For full notes on our implementation of Tables, review the documentation under Tables

Progress Bars

We implement our progress component with fewer features and include a border to increase contrast. In particular, we do not implement the multiple bars or the animation for the progress component. Otherwise, the documentation for Bootstrap Progress is applicable.


To align with the University’s identity, the Yale UI Component Library breakpoints are:

  • sm: 500px
  • md: 740px
  • lg: 980px
  • xl: 1220px


Focus-Visible is a polyfill for the :focus-visible pseudo-selector. Browsers implement focus styles inconsistently, such that some browsers will display focus styles when mouse users click on a focusable element. Many designers and developers find that behavior unattractive, and they typically respond by removing focus styles altogether, creating an accessibility problem for users who rely on focus. This polyfill only shows focus styles to keyboard user, and hides from mouse users consistently across browsers.

Sass Color Contrast Function

Because Bootstrap consistently presents color contrast issues, Yale has implemented a Sass color contrast library to force color contrast based on WCAG standards. The library is based on a gist by Sérgio Gomes. It is a best practice to pass all Sass color declarations through the find-accessible-colors function in order to ensure accessible colors.

Version History and Changelog


  • Removed Bootstrap.js from bundled JavaScript
  • Removed Ally.js from bundled JavaScript


  • Added a new layout example on Examples page
  • Included more Card designs
  • Added an Accordion design to replace the Collapse button


  • Added spinner component.
  • More distinct colors were chosen for Primary, Info, Secondary, and Light theme colors.
  • Adjusted hover state of badge links to have sufficient color contrast.
  • Adjusted focus indicator of forms and custom forms to be consistent with other focusable elements (to display black or white depending on the background color).
  • Increased color contrast ratio of <code> elements and the required (asterisk) symbol to be more distinct from the body text around it (and has a contrast ratio of 3:1 with the black body text).


  • Added components: tooltips/popovers, dropdowns, collapse, input groups, badges


  • Reduced the top margin of headings
  • Added fallback italic styles for italic fonts
  • Included a dismissable alert example with accessibility notes


  • Font class names updated to pull in the properly corresponding fonts
  • Alert components styled (with border, color, icons)
  • Added documentation on differences between Bootstrap and our library
  • Added CSS to implement focus-visible
  • Focus indicator updated to have increased color contrast depending on background color


  • Added two example layouts on the Examples page
  • Updated documentation on forms page to discourage use of input type=”number”
  • Changed the gutter width back to the Bootstrap default of 30px
  • Made several improvements to the documentation site navigation


  • Bundled entire Bootstrap JS (instead of individual Boostrap JS files)


  • Fixed npm package to include dist folder.
  • Added MIT license


  • Moved source code and documentation site to GitLab and GitLab pages, respectively.


  • Moved Scss files to dist folder to be included in downloadable zip file
  • Removed fonts and dist folders from commit history


  • Added Font Awesome v4.7 icon fonts back to flyout menu (included as CDN, with instructions)


  • Created npm package
  • Added Google Analytics to documentation site


  • Removed fonts from fonts folder (also removed @font-face rules in CSS)
  • Included instructions on how to add fonts
  • Added compiled and minified CSS and JS files to a downloadable zip file


  • Updated forms documentation with input types and HTML’s built-in validation features
  • Scrollable regions are now keyboard-accessible
  • Form input fields now have sufficient color contrast
  • Removed Mallory font (referencing a local GitHub page that hosts the Mallory font instead)
  • Removed local dependencies (yale-fonts and sass color contrast function) and added to src folder instead


  • Updated color variables so that everything is accessible by default (sass color contrast function warning will not appear)
  • Added Carousel component with documentation


  • Fix responsive menus and flyout menu example on examples page


  • Documentation Fixes
  • Adding yarn sassy script


  • Documentation for Nav and Navbar components
  • Implementation and documentation for the Yale Accessible Flyout Menu
  • Documentation for Progress Bars
  • Documentation for Pagination
  • Documentation for Media Object
  • Documentation for Jumbotrons
  • Documentation for Cards


  • Add popper.js dependency
  • Include nav and navbar from Bootstrap
  • Include badges from Bootstrap
  • Include cards from Bootstrap
  • Include dropdowns from Bootstrap, and add dropdowns to the compiled JavaScript
  • Inlucde jumbotron from Bootstrap
  • Include media from Bootstrap
  • Include progress from Bootstrap
  • Simplify custom typography implementation
  • Use navbar for documentation website
  • Tweak default focus styles
  • Tweak layout for documentation website


  • Change Bootstrap dependency to 4.3.1 from ^4.3.1
  • Add CSS autoprefixer to gulp tasks
  • Tweaked button typography
  • Add custom form elements


  • Combine tables, list groups, yale-bootstrap-base, buttons, and utilities into main repo, rather than separate projects
  • Update typography to be consistent with
  • Add pagination component
  • Hard code CSS for flyout menus


  • Hotfix: remove broken reference to yale flyout menu


  • Tweaks to yale topper logo sizing
  • Include Bootstrap Transitions
  • More robust error message reporting for Sass color contrast functions


  • Updates to topper typography color
  • Skip Link added to documentation website


  • Updates to Alerts and Buttons documentation
  • Simplified the example gulpfile


  • Overhaul documentation to make it more consistent
  • Add documentation about extending, dependencies
  • Refactor project to separate the Bootstrap adjustment from the Yale branding skin
  • Update readme, documentation website homepage


  • Rewrite the gulpfile to concatenate all of our vendor libraries.


  • Add collapsible button for documentation example code snippets in example.html
  • Tables documentation
  • Alerts documentation
  • Forms documentation for validation messages
  • Bootstrap utilities documentation
  • Modal dialogs documentation
  • Simplify the implementation of _images.scss
  • Images documentation
  • List Groups documentation
  • Breadcrumbs documentation


  • Make the alerts link styles visually accessible by default (don’t require .alert-link class for accessible links inside of alerts)


  • Fixed a bug that caused documentation website pages and sidebar navigation to not be created effectively
  • Fixed a bug that caused documentation website pages to have the sidebar crash into the main column
  • Updated the readme file to point to the documentation website home page