These are components that are common among at least 2 apps. If you need an icon or a card, it should come from the Core Components. To avoid unnecessary CSS in all apps, these are opt-in. Each item is an individual import, with the file name(s) in the notes area.
npm install @datacamp/styleguide
Import each necessary component by name or import the dc-core-components.scss
if the app is using all of the components.
npm update @datacamp/styleguide
Releases will include instructions for necessary updates. For the time being updates should be implemented by the front-end team.
The custom track badge is a combination of utility classes and dynamic values, based on customer choices. There is a color
value and a name
value, which are used to set the fill of the badge and the icon. The fill of the use
element with the class of badge-custom-track__color
can be set dynamically or the class can be used to override the default fill. To set the size of the badge, change the dc-u-wh-128
to one of the available widths.
<div class="dc-u-fx-center dc-u-pos-relative dc-u-wh-128">
<svg class="dc-u-stretch" viewBox="0 0 232 241" xmlns="http://www.w3.org/2000/svg" width="100%">
<defs>
<path d="M114 .361c30.864 0 64.371 11.924 100.52 35.77A30 30 0 0 1 228 61.175v104.241a30 30 0 0 1-12.438 24.323c-42.736 30.857-76.59 46.286-101.562 46.286-24.972 0-58.826-15.429-101.562-46.286A30 30 0 0 1 0 165.415V61.174a30 30 0 0 1 13.48-25.042C49.63 12.285 83.136.362 114 .362z" id="a" />
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="c">
<stop stop-color="#FFF" stop-opacity=".2" offset="0%" />
<stop stop-opacity=".1" offset="100%" />
</linearGradient>
<path d="M114 .361c30.864 0 64.371 11.924 100.52 35.77A30 30 0 0 1 228 61.175v104.241a30 30 0 0 1-12.438 24.323c-42.736 30.857-76.59 46.286-101.562 46.286-24.972 0-58.826-15.429-101.562-46.286A30 30 0 0 1 0 165.415V61.174a30 30 0 0 1 13.48-25.042C49.63 12.285 83.136.362 114 .362z" id="d" />
<linearGradient x1="91.147%" y1="15.351%" x2="64.651%" y2="59.021%" id="f">
<stop offset="0%" />
<stop stop-opacity="0" offset="100%" />
</linearGradient>
<linearGradient x1="32.002%" y1="5.632%" x2="50%" y2="27.114%" id="g">
<stop offset="0%" />
<stop stop-opacity="0" offset="100%" />
</linearGradient>
<path d="M114 .361c30.864 0 64.371 11.924 100.52 35.77A30 30 0 0 1 228 61.175v104.241a30 30 0 0 1-12.438 24.323c-42.736 30.857-76.59 46.286-101.562 46.286-24.972 0-58.826-15.429-101.562-46.286A30 30 0 0 1 0 165.415V61.174a30 30 0 0 1 13.48-25.042C49.63 12.285 83.136.362 114 .362z" id="h" />
<linearGradient x1="50%" y1="0%" x2="50%" y2="97.676%" id="j">
<stop stop-color="#DBF0FF" offset="0%" />
<stop stop-color="#A8C8DA" offset="100%" />
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(2 2)">
<mask id="b" fill="#fff">
<use xlink:href="#a" />
</mask>
<!-- Custom Color -->
<use class="badge-custom-track__color" fill="#868A8D" xlink:href="#a" />
<g mask="url(#b)" fill="url(#c)" fill-rule="nonzero">
<path d="M-55.89 154.878L65.11-54.7l214.775 124-121 209.578z" />
</g>
</g>
<g transform="translate(2 2)">
<mask id="e" fill="#fff">
<use xlink:href="#d" />
</mask>
<g fill-rule="nonzero" opacity=".024" mask="url(#e)">
<path d="M135.5 63.173c41.205 0 86.371-21.058 135.5-63.173v238.88a30 30 0 0 1-12.331 24.244c-51.955 37.863-93.011 56.795-123.169 56.795s-71.214-18.932-123.169-56.795A30 30 0 0 1 0 238.879V0c49.129 42.115 94.295 63.173 135.5 63.173z" fill="url(#f)" transform="translate(-50 56)" />
<path d="M214 30c56.636 0 118.447 17.912 185.432 53.737A20 20 0 0 1 410 101.374v148.831a30 30 0 0 1-15.289 26.146c-76.36 42.964-136.596 64.446-180.711 64.446-44.115 0-104.352-21.482-180.711-64.446A30 30 0 0 1 18 250.205V101.374a20 20 0 0 1 10.568-17.637C95.553 47.912 157.364 30 214 30z" fill="url(#g)" transform="translate(-50 56)" />
</g>
</g>
<g transform="translate(2 2)">
<mask id="i" fill="#fff">
<use xlink:href="#h" />
</mask>
<path d="M114 163c32.83 0 68.598 13.258 107.303 39.773a20 20 0 0 1 8.697 16.5v111.946a30 30 0 0 1-12.426 24.314c-43.594 31.51-78.12 47.264-103.574 47.264-25.455 0-59.98-15.755-103.574-47.264A30 30 0 0 1-2 331.219V219.273a20 20 0 0 1 8.697-16.5C45.402 176.258 81.17 163 114 163z" fill="#000" fill-rule="nonzero" opacity=".077" mask="url(#i)" />
</g>
<path d="M115 .361c31.08 0 64.77 11.989 101.07 35.936A31 31 0 0 1 230 62.174v104.241a31 31 0 0 1-12.853 25.133c-42.891 30.97-76.914 46.476-102.147 46.476-25.233 0-59.256-15.505-102.147-46.476A31 31 0 0 1 0 166.415V62.174a31 31 0 0 1 13.93-25.877C50.23 12.35 83.92.361 115 .361z" stroke="url(#j)" stroke-width="2" transform="translate(1 1)" />
<path d="M116 5.361c-30.217 0-63.174 11.728-98.868 35.275A27 27 0 0 0 5 63.174v104.241a27 27 0 0 0 11.194 21.89c42.269 30.52 75.617 45.72 99.806 45.72 24.189 0 57.537-15.2 99.806-45.72A27 27 0 0 0 227 167.416V63.174a27 27 0 0 0-12.132-22.538C179.174 17.089 146.217 5.36 116 5.36z" stroke="#FFF" stroke-width="6" />
</g>
</svg>
<span class="dc-icon dc-icon--size-18 dc-icon--white dc-u-h-50pc dc-u-w-50pc dc-u-pos-relative">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#datacamp" />
</svg>
</span>
</div>
The base card, with minimal padding, used for small UI components. It can be used on most HTML elements.
Abstract: Cards
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card">
Small UI
</div>
Modified .dc-card
with alternative square or circle shape.
Rounded Square: We use this card for everything within our application, we never user straight corners. Circle: Used for empty states, Help tooltips.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--square dc-u-mb-32">
Square
</div>
<div class="dc-card dc-card--circle dc-u-fx dc-u-fx-aic dc-u-fx-jcc dc-u-h-80 dc-u-w-80">
Circle
</div>
Modified .dc-card
with increased padding, used for areas with content. It can be used on most HTML elements, but it most likely a container element, like div
, article
, section
, etc.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--content">
Card with content
</div>
Modified .dc-card
with a border rather than a shadow. We use this component on white backgrounds because the shadow doesn't work on bright backgrounds.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--bordered ">
Card with border
</div>
Used for components on backgrounds other than white. Modified .dc-card
with alternative shadow effects:
.dc-card--shadowed-sm
.dc-card--shadowed-lg
.dc-card--shadowed-xl
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--shadowed-sm dc-u-mb-32">
Card with small shadow modifier
</div>
<div class="dc-card dc-card--shadowed-lg dc-u-mb-32">
Card with large shadow modifier
</div>
<div class="dc-card dc-card--shadowed-xl">
Card with extra large shadow modifier
</div>
Modified .dc-card
with optional sections:
.dc-card__header
.dc-card__body
.dc-card__footer
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--sectioned ">
<div class="dc-card__header">
Header
</div>
<div class="dc-card__body">
Body
</div>
<div class="dc-card__footer">
Footer
</div>
</div>
<div class="dc-card dc-card--sectioned dc-card--content">
<div class="dc-card__header">
Header
</div>
<div class="dc-card__body">
Body
</div>
<div class="dc-card__footer">
Footer
</div>
</div>
Add the modifier class .dc-card--sectioned
and .dc-card--bordered
to the .dc-card
root div.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--sectioned dc-card--bordered">
<div class="dc-card__header">
Header
</div>
<div class="dc-card__body">
Body
</div>
<div class="dc-card__footer">
Footer
</div>
</div>
Add the modifier classes .dc-card--sectioned
, .dc-card--content
and .dc-card--bordered
to the .dc-card
root div.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--sectioned dc-card--content dc-card--bordered">
<div class="dc-card__header">
Header
</div>
<div class="dc-card__body">
Body
</div>
<div class="dc-card__footer">
Footer
</div>
</div>
Modified .dc-card
with a subtle hover effect.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--content dc-card--interactive dc-u-mb-32">
Card with a hover effect
</div>
<div class="dc-card dc-card--content dc-card--bordered dc-card--interactive dc-u-mb-32">
Card with border and a hover effect
</div>
<div class="dc-card dc-card--content dc-card--shadowed-sm dc-card--interactive dc-u-mb-32">
Card with a small shadow and a hover effect
</div>
<div class="dc-card dc-card--content dc-card--shadowed-lg dc-card--interactive dc-u-mb-32">
Card with a large shadow and a hover effect
</div>
<div class="dc-card dc-card--content dc-card--shadowed-xl dc-card--interactive">
Card with an extra large shadow and a hover effect
</div>
Modified .dc-card
, where .dc-card--custom
is used to reset padding to 0. Utility classes or named classes and be used to match the spacing to the designs.
Import all card styles: @import {local path to the package}/core-components/scss/card;
<div class="dc-card dc-card--custom dc-u-p-16 dc-u-p-48@lg">
Card with custom spacing. This one uses utility classes to have 16px padding on small viewports and 48px on large screens.
</div>
This is base CSS to round an element and set a fixed size to it. Content and styles are added with utility classes.
<!-- Example with shadow -->
<div class="
dc-circle dc-circle--56
dc-u-bgc-white
dc-u-bs-lg
dc-u-color-primary
dc-u-fw-bold
dc-u-fx-center">
2
</div>
Collapse toggle has directional and positional modifiers. The directional modifiers control which cardinal direction the half circle will point. The direction of the arrow icon is not effected by the modifier classes and is controled by the xlink:href
as normal. The positional modifiers control what side the collapse toggle will attach itself to.
Directional modifiers: dc-collapse--east
, dc-collapse--west
, dc-collapse--north
, dc-collapse--south
.
Positional modifiers: dc-collapse--position-left
, dc-collapse--position-right
, dc-collapse--position-top
, dc-collapse--position-bottom
.
<div class="dc-collapse dc-collapse--east dc-collapse--position-left">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span>
</div>
This example shows all the directional and position possiblities for the collapse toggle.
<div class="dc-u-bs-border dc-u-pos-relative dc-u-h-128 dc-u-w-128">
<div class="dc-collapse dc-collapse--east dc-collapse--position-left">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--west dc-collapse--position-left">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_left" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--east dc-collapse--position-right">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--west dc-collapse--position-right">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_left" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--north dc-collapse--position-top">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_up" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--south dc-collapse--position-top">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_down" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--north dc-collapse--position-bottom">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_up" />
</svg>
</span>
</div>
<div class="dc-collapse dc-collapse--south dc-collapse--position-bottom">
<span class="dc-icon dc-icon--size-12 dc-icon--grey-oslo dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_down" />
</svg>
</span>
</div>
</div>
<div class="dc-count-indicator dc-count-indicator--red">
5
</div>
<a href="#" class="dc-btn dc-btn--white dc-btn--shadowed dc-btn--sm">
<span class="dc-icon dc-icon--size-18 dc-icon--primary dc-icon--flex dc-u-mr-8">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#chat" />
</svg>
</span> Reported Issues
<div class="dc-count-indicator dc-count-indicator--red dc-count-indicator--right">
5
</div>
</a>
<a href="#" class="dc-btn dc-btn--white dc-btn--shadowed dc-btn--sm">
<span class="dc-icon dc-icon--size-18 dc-icon--primary dc-icon--flex dc-u-mr-8">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#chat" />
</svg>
</span> Reported Issues
<div class="dc-count-indicator dc-count-indicator--red dc-count-indicator--right">
99+
</div>
</a>
Toggle the display of the Dropdown content by adding and removing the state class .dc-is-open
.
Dropdown has two modifiers that control the placement of the Dropdown content
below the element: dc-dropdown--left
or dc-dropdown--right
.
Responsive modifiers: It is also possible to apply the following modifiers
responsively at various breakpoints: dc-dropdown--center
, dc-dropdown--left
and dc-dropdown--right
. For example you could apply the modifier dc-dropdown--left
by default and also add the class dc-dropdown--right@sm
which switches the Dropdown
to the right position at 768px
and above.
<div class="dc-dropdown dc-is-open">
<button class="dc-btn dc-btn--bordered dc-dropdown__toggle">
Dropdown button
</button>
<div class="dc-dropdown__content">
<ul class="dc-dropdown__list dc-dropdown__list--bordered">
<li class="dc-dropdown__item">
<a class="dc-dropdown__link" href="#">Action</a>
</li>
<li class="dc-dropdown__item dc-is-active">
<a class="dc-dropdown__link" href="#">Another Action</a>
</li>
<li class="dc-dropdown__item" href="#">
<a class="dc-dropdown__link" href="#">Something else here</a>
</li>
</ul>
</div>
</div>
Add a caret to the dropdown element using the modifier .dc-dropdown--caret
.
<div class="dc-dropdown dc-dropdown--caret dc-is-open">
<button class="dc-btn dc-btn--bordered dc-dropdown__toggle">
Dropdown button
</button>
<div class="dc-dropdown__content">
<ul class="dc-dropdown__list dc-dropdown__list--bordered">
<li class="dc-dropdown__item">
<a class="dc-dropdown__link" href="#">Action</a>
</li>
<li class="dc-dropdown__item dc-is-active">
<a class="dc-dropdown__link" href="#">Another Action</a>
</li>
<li class="dc-dropdown__item" href="#">
<a class="dc-dropdown__link" href="#">Something else here</a>
</li>
</ul>
</div>
</div>
Add a icon to the dropdown element by adding an SVG icon with the class dc-dropdown__icon
.
<div class="dc-dropdown dc-is-open">
<button class="dc-btn dc-btn--bordered dc-dropdown__toggle dc-u-fx dc-u-fx-aic">
Dropdown button
<span class="dc-dropdown__icon dc-u-d-ib dc-u-ml-8 dc-u-wh-12">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_down" />
</svg>
</span>
</button>
<div class="dc-dropdown__content">
<ul class="dc-dropdown__list dc-dropdown__list--bordered">
<li class="dc-dropdown__item">
<a class="dc-dropdown__link" href="#">Action</a>
</li>
<li class="dc-dropdown__item dc-is-active">
<a class="dc-dropdown__link" href="#">Another Action</a>
</li>
</ul>
</div>
</div>
Add an "arrow" pointing from the Dropdown content to the Dropdown
element using the modifier .dc-dropdown--arrow
.
<div class="dc-dropdown dc-dropdown--arrow dc-is-open">
<button class="dc-btn dc-btn--bordered dc-dropdown__toggle">
Dropdown button
</button>
<div class="dc-dropdown__content">
<ul class="dc-dropdown__list dc-dropdown__list--bordered">
<li class="dc-dropdown__item">
<a class="dc-dropdown__link" href="#">Action</a>
</li>
<li class="dc-dropdown__item dc-is-active">
<a class="dc-dropdown__link" href="#">Another Action</a>
</li>
<li class="dc-dropdown__item" href="#">
<a class="dc-dropdown__link" href="#">Something else here</a>
</li>
</ul>
</div>
</div>
Angled header, using multiple backgrounds. The left height of the logo accent is ~170px and the angled accent is ~490px.
<header class="dc-header-angled dc-header-angled--sm">
<!-- Hack to display, not needed in production -->
<div class="dc-u-p-128"> </div>
</header>
Angled header, using multiple backgrounds. The left height of the logo accent is ~120px and the angled accent is ~420px.
<header class="dc-header-angled dc-header-angled--xs">
<!-- Hack to display, not needed in production -->
<div class="dc-u-p-128"> </div>
</header>
Angled header, using multiple backgrounds. The left height of the logo accent is ~170px and the angled accent is ~630px.
<header class="dc-header-angled">
<!-- Hack to display, not needed in production -->
<div class="dc-u-p-128"> </div>
</header>
The default dc-headstone
is 64x64 and it shifts itself up half it's height (32px). For it to break out of a container, any padding has to be cleared from the element. If the dc-u-fx-center
utility is used on the dc-headstone
element, it's content will be vertically centered inside and outside of the container element.
A dc-card
is used as an example, but is not necessary.
<div class="dc-card dc-u-pt-0">
<div class="dc-headstone dc-u-fx-center">
<span class="dc-icon dc-icon--size-64 dc-icon--primary">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#lock" />
</svg>
</span>
</div>
</div>
The size modifier is a mandatory class. View all icons ↓
Other options:
.dc-icon--{color}
class to adjust the icon's color. When no color
is provided, the icon will default to currentColor
..dc-icon--hover-{color}
class to adjust the icon's hover color..dc-icon--active-{color}.is-active
class to set the icon's active state..dc-icon--flex
class to set the icon's top value to 0. For situations when the parent container has display: flex
and align-items: center
.Import icon styles: @import {local path to the package}/core-components/scss/icon;
Dependency: Icons require HTML insertion of the symbols.svg
file. Please ask in #engineering-frontend for setup examples, based on the experience of other products.
<span class="dc-icon dc-icon--size-18 dc-icon--primary ">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#add" />
</svg>
</span>
Place the preview image inside the .dc-img-uploader__image-wrapper
div and give it(the image) the .dc-img-uploader__image
class name.
Import image file uploader: @import {local path to the package}/core-components/scss/image-file-uploader;
<div class="dc-img-uploader">
<div class="dc-img-uploader__image-wrapper"></div>
<div class="dc-img-uploader__body">
<input class="dc-img-uploader__input js-img-uploader-input" id="dc-img-uploader__input" accept=".png, .jpeg, .jpg" type="file">
<label class="dc-img-uploader__label" for="dc-img-uploader__input">Upload new picture</label>
<button class="dc-btn dc-btn--primary dc-img-uploader__btn js-img-uploader-btn">Upload new picture</button>
<strong class="dc-img-uploader__name js-img-uploader-name"></strong>
</div>
</div>
Used for navigating between pages used in enterprise & teach. Add class of .dc-is-active
to .dc-pagination__page
for active page state.
<div class="dc-pagination">
<ul class="dc-pagination__list">
<li>
<button class="dc-btn--link dc-u-mr-24">
<svg class="dc-icon--primary" width="15" height="12">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_left_double" />
</svg>
</button>
</li>
<li>
<button class="dc-btn--link dc-u-mr-24">
<svg class="dc-icon--primary" width="12" height="12">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_left" />
</svg>
</button>
</li>
<li>
<button class="dc-pagination__page">1</button>
</li>
<li>
<button class="dc-pagination__page dc-is-active">2</button>
</li>
<li>
<button class="dc-pagination__page">3</button>
</li>
<li>
<button class="dc-btn--link dc-u-ml-24">
<svg class="dc-icon--primary" width="12" height="12">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</button>
</li>
<li>
<button class="dc-btn--link dc-u-ml-24">
<svg class="dc-icon--primary" width="15" height="12">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right_double" />
</svg>
</button>
</li>
</ul>
</div>
We use the Bootstrap Popover and this is the default. The button
element and classes can vary.
The placement and trigger type are options set by the data attributes:
data-placement={top|right|bottom|left}
data-trigger={focus|hover}
Import all popover styles: @import {local path to the package}/core-components/scss/popover;
Dependencies: tooltip.js
, popover.js
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="top" data-trigger="focus">Popover on top</button>
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="right" data-trigger="focus">Popover on right</button>
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="bottom" data-trigger="focus">Popover on bottom</button>
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="left" data-trigger="focus">Popover on left</button>
Add the .popover-trigger--primary
for this style.
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger popover-trigger--primary" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="top" data-trigger="focus">Popover on top</button>
Add the .popover-trigger--primary-dark
for this style.
<button type="button" class="dc-btn dc-btn--primary-light popover-trigger popover-trigger--primary-dark" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-placement="top" data-trigger="focus">Popover on top</button>
Used for XP for example, where the unit is not always percentages. Fill is controlled by an inline width
style.
Import all progress bar styles: @import {local path to the package}/core-components/scss/progress-bar;
<div class="dc-progress-bar">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 0%;"></span>
</div>
</div>
<!-- Extra examples to show style -->
<!-- u-spacing-t3 is not part of the component by default -->
<div class="dc-progress-bar">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;"></span>
</div>
</div>
Fill is controlled by an inline width
style. The completed version requires a conditional modifier class: .dc-progress-bar--completed
.
Import all progress bar styles: @import {local path to the package}/core-components/scss/progress-bar;
<div class="dc-progress-bar dc-progress-bar--completed">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 100%;">100%</span>
</div>
</div>
To show the progress percentage, output text in .progress-bar__fill
.
<div class="dc-progress-bar">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 0%">
<!-- We hide the percentage if below 3% -->
</span>
</div>
</div>
<!-- Extra examples to show style -->
<!-- u-spacing-t3 is not part of the component by default -->
<div class="dc-progress-bar">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;">75%</span>
</div>
</div>
To show the progress percentage, output text in .progress-bar__fill
. The completed version requires a conditional modifier class: .dc-progress-bar--completed
.
<div class="dc-progress-bar dc-progress-bar--completed">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;">75%</span>
</div>
</div>
For use on non-white backgrounds, add the .progress-bar--light
modifier class.
<div class="bg-primary-extra-light">
<!-- Div is only for dark context -->
<div class="dc-progress-bar dc-progress-bar--light">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 0%;"></span>
</div>
</div>
<!-- Extra examples to show style -->
<!-- u-spacing-t3 is not part of the component by default -->
<div class="dc-progress-bar dc-progress-bar--light u-spacing-t3">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;"></span>
</div>
</div>
<div class="dc-progress-bar dc-progress-bar--light">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;">75%</span>
</div>
</div>
<div class="dc-progress-bar dc-progress-bar--light dc-progress-bar--completed">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 100%;">100%</span>
</div>
</div>
<!-- Div is only for dark context -->
</div>
Used when there is not much space to use the big progress. For the small bar, add the .dc-progress-bar--small
modifier.
Import all progress bar styles: @import {local path to the package}/core-components/scss/progress-bar;
<div class="dc-progress-bar dc-progress-bar--small">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 0%;"></span>
</div>
</div>
<!-- Extra examples to show style -->
<!-- u-spacing-t3 is not part of the component by default -->
<div class="dc-progress-bar dc-progress-bar--small">
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;"></span>
</div>
</div>
Used for annotating the percentage progress. To display text, an additional span
with the value is needed. This should only be displayed if the value is 3% or more.
Modifiers of the progress bar are available to control the color of the text and the fill. These were added for password verification.
modifier | color | result |
---|---|---|
.dc-progress--red |
$dc-red |
|
.dc-progress--orange |
$dc-orange |
|
.dc-progress--green |
$dc-green |
Import all progress bar styles: @import {local path to the package}/core-components/scss/progress-bar;
<div class="dc-progress-bar dc-progress-bar--small">
<span class="dc-progress-bar__text">75%</span>
<div class="dc-progress-bar__bar">
<span class="dc-progress-bar__fill" style="width: 75%;"></span>
</div>
</div>
<div class="dc-range-slider dc-range-slider--video">
<div class="dc-range-slider__fill"></div>
<div class="dc-range-slider__handle"></div>
</div>
<div class="dc-range-slider dc-range-slider--slide">
<div class="dc-range-slider__fill"></div>
<div class="dc-range-slider__handle"></div>
</div>
<span class="dc-icon dc-icon--size-18 dc-icon--grey-dark dc-icon--spinner">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#spinner" />
</svg>
</span>
<table class="dc-table">
<thead class="dc-table__thead">
<tr>
<th role="columnheader" aria-disabled="true" class="dc-table__th ">
<label class="dc-input-checkbox" for="checkbox-label-1">
<input id="checkbox-label-1" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th" colspan="2">
File Name
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
Uploaded At
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Type
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Size
</th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
</tr>
</thead>
<tbody class="dc-table__tbody">
<tr class="dc-table__tr">
<td class="dc-table__td">
<label class="dc-input-checkbox" for="checkbox-label-2">
<input id="checkbox-label-2" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td">
<label class="dc-input-checkbox" for="checkbox-label-3">
<input id="checkbox-label-3" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
</tbody>
<tfoot></tfoot>
</table>
<div class="dc-table-wrapper dc-table-wrapper--bordered">
<table class="dc-table dc-table--white">
<thead class="dc-table__thead">
<tr>
<th role="columnheader" aria-disabled="true" class="dc-table__th dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-1">
<input id="checkbox-label-1" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th" colspan="2">
File Name
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
Uploaded At
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Type
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Size
</th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
</tr>
</thead>
<tbody class="dc-table__tbody">
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-2">
<input id="checkbox-label-2" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-3">
<input id="checkbox-label-3" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
</tbody>
<tfoot></tfoot>
</table>
</div>
<div class="dc-table-wrapper dc-table-wrapper--bordered">
<table class="dc-table dc-table--white dc-table--bordered">
<thead class="dc-table__thead">
<tr>
<th role="columnheader" aria-disabled="true" class="dc-table__th dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-1">
<input id="checkbox-label-1" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th" colspan="2">
File Name
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
Uploaded At
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Type
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Size
</th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
</tr>
</thead>
<tbody class="dc-table__tbody">
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-2">
<input id="checkbox-label-2" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-3">
<input id="checkbox-label-3" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-4">
<input id="checkbox-label-4" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-5">
<input id="checkbox-label-5" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
</tbody>
<tfoot></tfoot>
</table>
</div>
<div class="dc-table-wrapper">
<table class="dc-table dc-table--headless">
<thead class="dc-table__thead">
<tr>
<th role="columnheader" aria-disabled="true" class="dc-table__th dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-1">
<input id="checkbox-label-1" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th" colspan="2">
File Name
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
Uploaded At
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Type
</th>
<th role="columnheader" aria-sort="none" class="dc-table__th">
File Size
</th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
<th role="columnheader" aria-disabled="true" class="dc-table__th"></th>
</tr>
</thead>
<tbody class="dc-table__tbody">
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-2">
<input id="checkbox-label-2" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-3">
<input id="checkbox-label-3" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-4">
<input id="checkbox-label-4" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-5">
<input id="checkbox-label-5" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<svg class="dc-icon--primary" width="18" height="18">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#download" />
</svg>
</td>
<td class="dc-table__td">
<button class="dc-btn dc-btn--tertiary dc-btn--sm">Copy Link</button>
</td>
</tr>
</tbody>
<tfoot></tfoot>
</table>
</div>
<div class="dc-table--search">
<div class="dc-table-header">
<input type="search" placeholder="Search..." class="dc-input-search dc-u-w-100pc">
</div>
<div class="dc-table-wrapper">
<table class="dc-table">
<tbody class="dc-table__tbody">
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-2">
<input id="checkbox-label-2" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<a class="dc-btn--link" href="#">
<span class="dc-icon dc-icon--size-12 dc-icon--primary dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span> </a>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-3">
<input id="checkbox-label-3" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<a class="dc-btn--link" href="#">
<span class="dc-icon dc-icon--size-12 dc-icon--primary dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span> </a>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-4">
<input id="checkbox-label-4" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<a class="dc-btn--link" href="#">
<span class="dc-icon dc-icon--size-12 dc-icon--primary dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span> </a>
</td>
</tr>
<tr class="dc-table__tr">
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<label class="dc-input-checkbox" for="checkbox-label-5">
<input id="checkbox-label-5" class="dc-input-checkbox__input" type="checkbox">
<span class="dc-input-checkbox__indicator u-fx-center">
<span class="dc-icon dc-input-checkbox__check">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#checkmark" />
</svg>
</span>
</span>
</label>
</td>
<td class="dc-table__td dc-table__td--avatar">
<img height="28" width="28" src="https://styleguide-assets.datacamp.com/images/core/components/image-file-uploader/placeholder-cbaf724d5e.svg">
</td>
<td class="dc-table__td">[email protected]</td>
<td class="dc-table__td">22/01/2018 at 09:12 am</td>
<td class="dc-table__td">Image</td>
<td class="dc-table__td">72 kB</td>
<td class="dc-table__td dc-table__td--shrink dc-table__td--icon">
<a class="dc-btn--link" href="#">
<span class="dc-icon dc-icon--size-12 dc-icon--primary dc-icon--flex">
<svg class="dc-icon__svg">
<use xlink:href="/assets/toolkit/images/core-components/icons/svg/symbols.svg#arrow_right" />
</svg>
</span> </a>
</td>
</tr>
</tbody>
<tfoot></tfoot>
</table>
</div>
</div>
Each of your tabs requires a unique id
on the page. Add this id
as the href
to each tab hyperlink to toggle their visibility.
A tab bar can have an optional action link which will be aligned to the right.
Import all tabs styles: @import {local path to the package}/core-components/scss/tabs;
<div class="minimal-tabs-bar">
<ul class="minimal-tabs list-unstyled" role="tablist">
<li class="minimal-tab active">
<a class="minimal-tab__link" href="#in-progress" aria-controls="in-progress" role="tab" data-toggle="tab" data-text="Courses in Progress (2)">Courses in Progress (2)</a>
</li>
<li class="minimal-tab">
<a class="minimal-tab__link" href="#completed" aria-controls="completed" role="tab" data-toggle="tab" data-text="Completed (4)">Completed (4)</a>
</li>
</ul>
<a class="minimal-tabs__action" href="#">
<img class="minimal-tabs__action-icon" src="https://cdn.datacamp.com/main-app/assets/icons/explore-courses-library-icon-898485ab5575f7b3809b188d7f97820a122ccc72171191badf81c72d3e0b74a6.svg" alt="Explore courses library icon">
Explore Course Library
</a>
</div>
<div class="minimal-tab-pane tab-pane pt-md active" role="tabpanel" id="in-progress">
<p>In progress tab content</p>
</div>
<div class="minimal-tab-pane tab-pane pt-md" role="tabpanel" id="completed">
<p>Completed tab content</p>
</div>