Button Default

This component is deprecated

Mixins

button-default

@mixin button-default() { ... }@mixin button-default() { 
  @include common.button-common;
  @include kib-core-spacing(padding, huge, horizontal);

  background: settings.$default-background;
  color: settings.$default-text-color;
  transition: background-color 100ms ease-out;

  & + & {
    @include kib-core-spacing(margin, small, start);
  }

  &::after {
    border-color: settings.$default-background-focus;
  }

  &:focus {
    background-color: settings.$default-background-focus;
    outline: 0;

    &::after {
      opacity: 1;
    }
  }

  &:hover {
    background-color: settings.$default-background-hover;
    color: settings.$default-text-color;
    text-decoration: none;
  }

  &:active {
    background-color: settings.$default-background-active;
  }

  &:disabled,
  &--disabled {
    @include common.button-disabled-common;
  }

  // Hides outline when hovering over component while focused
  &:hover:focus {
    &::after {
      opacity: 0;
    }
  }
 }
Description

Default styles

Parameters

None.

Author
  • CDS

button-loading

@mixin button-loading() { ... }@mixin button-loading() { 
  &,
  &:focus,
  &:hover,
  &:active {
    background-color: settings.$default-background-active;
  }
 }
Description

Default loading styles

Parameters

None.

Requires
Author
  • CDS

button-secondary

@mixin button-secondary() { ... }@mixin button-secondary() { 
  background-color: settings.$secondary-background;
  box-shadow: inset 0 0 0 settings.$secondary-border-width settings.$secondary-border-color;
  color: settings.$secondary-text-color;

  &:focus {
    background-color: transparent;
  }

  &:hover {
    background-color: settings.$secondary-background-hover;
    color: settings.$secondary-text-color;
  }

  &:active {
    background-color: settings.$secondary-background-active;
  }
 }
Description

Secondary variant styles

Parameters

None.

Author
  • CDS

button-secondary-loading

@mixin button-secondary-loading() { ... }@mixin button-secondary-loading() { 
  &,
  &:focus,
  &:hover,
  &:active {
    background-color: settings.$secondary-background-active;
  }
 }
Description

Secondary variant loading styles

Parameters

None.

Requires
Author
  • CDS

button-danger

@mixin button-danger() { ... }@mixin button-danger() { 
  background-color: settings.$danger-background;

  &::after {
    border-color: settings.$danger-background-focus;
  }

  &:focus {
    background-color: settings.$danger-background-focus;
  }

  &:hover {
    background-color: settings.$danger-background-hover;
  }

  &:active {
    background-color: settings.$danger-background-active;
  }
 }
Description

Danger variant styles

Parameters

None.

Author
  • CDS

button-danger-loading

@mixin button-danger-loading() { ... }@mixin button-danger-loading() { 
  &,
  &:focus,
  &:hover,
  &:active {
    background-color: settings.$danger-background-active;
  }
 }
Description

Danger variant loading styles

Parameters

None.

Requires
Author
  • CDS

button-danger-secondary

@mixin button-danger-secondary() { ... }@mixin button-danger-secondary() { 
  background-color: settings.$secondary-background;
  color: settings.$danger-background;

  &:hover {
    background-color: settings.$danger-secondary-background-hover;
  }

  &:active {
    background-color: settings.$danger-secondary-background-active;
    color: settings.$danger-secondary-text-color-active;
  }
 }
Description

Secondary danger variant styles

Parameters

None.

Author
  • CDS

button-danger-secondary-loading

@mixin button-danger-secondary-loading() { ... }@mixin button-danger-secondary-loading() { 
  &,
  &:focus,
  &:hover,
  &:active {
    background-color: settings.$danger-secondary-background-active;
    color: settings.$danger-secondary-text-color-active;
  }
 }
Description

Secondary danger variant loading styles

Parameters

None.

Author
  • CDS

button-transactional

@mixin button-transactional() { ... }@mixin button-transactional() { 
  background-color: settings.$transactional-background;

  &::after {
    border-color: settings.$transactional-background-focus;
  }

  &:focus {
    background-color: settings.$transactional-background-focus;
  }

  &:hover {
    background-color: settings.$transactional-background-hover;
  }

  &:active {
    background-color: settings.$transactional-background-active;
  }
 }
Description

Transactional variant styles

Parameters

None.

Author
  • CDS

button-transactional-loading

@mixin button-transactional-loading() { ... }@mixin button-transactional-loading() { 
  &,
  &:focus,
  &:hover,
  &:active {
    background-color: settings.$transactional-background-active;
  }
 }
Description

Transactional variant loading styles

Parameters

None.

Author
  • CDS

button-full-width

@mixin button-full-width() { ... }@mixin button-full-width() { 
  display: flex;
  width: 100%;

  & + & {
    @include kib-core-spacing(margin, none, start);
    @include kib-core-spacing(margin, small, top);
  }
 }
Description

Full width button variant styles

Parameters

None.

Author
  • CDS

button-with-icon

@mixin button-with-icon() { ... }@mixin button-with-icon() { 
  &__icon {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    width: settings.$icon-size;
    height: settings.$icon-size;

    &:not(:only-child) {
      @include kib-core-spacing(margin, small, end);
    }

    > svg {
      fill: currentColor;
    }
  }
 }
Description

Button with leading icon variant styles

Parameters

None.

Requires
Author
  • CDS

Variables

default-background

Deprecated!

Kept to avoid breaking change

$default-background: kib-core-theme-get('next', 'brand') !default;
Description

Default background color

Type

Color

Used by
Author
  • CDS

default-background-hover

Deprecated!

Kept to avoid breaking change

$default-background-hover: kib-core-theme-get('next', 'brand', 400) !default;
Description

Default background color on hover

Type

Color

Used by
Author
  • CDS

default-background-focus

Deprecated!

Kept to avoid breaking change

$default-background-focus: kib-core-theme-get('next', 'brand', 600) !default;
Description

Default background color on focus

Type

Color

Used by
Author
  • CDS

default-background-active

Deprecated!

Kept to avoid breaking change

$default-background-active: kib-core-theme-get('next', 'brand', 800) !default;
Description

Default background color when pressed

Type

Color

Author
  • CDS

default-text-color

Deprecated!

Kept to avoid breaking change

$default-text-color: kib-core-theme-get('next', 'neutral', 50) !default;
Description

Default text color

Type

Color

Used by
Author
  • CDS

secondary-background

Deprecated!

Kept to avoid breaking change

$secondary-background: transparent !default;
Description

Secondary variant background color

Type

Color

Author
  • CDS

secondary-background-hover

Deprecated!

Kept to avoid breaking change

$secondary-background-hover: kib-core-theme-get('next', 'brand', 50) !default;
Description

Secondary variant background color on hover

Type

Color

Author
  • CDS

secondary-background-active

Deprecated!

Kept to avoid breaking change

$secondary-background-active: kib-core-theme-get('next', 'brand', 100) !default;
Description

Secondary variant background color when pressed

Type

Color

Author
  • CDS

secondary-border-color

Deprecated!

Kept to avoid breaking change

$secondary-border-color: currentColor !default;
Description

Secondary variant border color

Type

Color

Author
  • CDS

secondary-border-width

Deprecated!

Kept to avoid breaking change

$secondary-border-width: unit.rem(2px) !default;
Description

Secondary variant border width

Type

Number

Author
  • CDS

secondary-text-color

Deprecated!

Kept to avoid breaking change

$secondary-text-color: $default-background !default;
Description

Secondary variant text color

Type

Color

Author
  • CDS

danger-background

Deprecated!

Kept to avoid breaking change

$danger-background: kib-core-theme-get('next', 'danger') !default;
Description

Danger variant background color

Type

Color

Author
  • CDS

danger-background-hover

Deprecated!

Kept to avoid breaking change

$danger-background-hover: kib-core-theme-get('next', 'danger', 600) !default;
Description

Danger variant background color on hover

Type

Color

Used by
Author
  • CDS

danger-background-focus

Deprecated!

Kept to avoid breaking change

$danger-background-focus: $danger-background !default;
Description

Danger variant background color on focus

Type

Color

Used by
Author
  • CDS

danger-background-active

Deprecated!

Kept to avoid breaking change

$danger-background-active: kib-core-theme-get('next', 'danger', 'high') !default;
Description

Danger variant background color when pressed

Type

Color

Author
  • CDS

danger-secondary-background-hover

Deprecated!

Kept to avoid breaking change

$danger-secondary-background-hover: kib-core-theme-get('next', 'danger', 'low') !default;
Description

Secondary danger variant background color on hover

Type

Color

Author
  • CDS

danger-secondary-background-active

Deprecated!

Kept to avoid breaking change

$danger-secondary-background-active: kib-core-theme-get('next', 'danger', 100) !default;
Description

Secondary danger variant background color when pressed

Type

Color

Author
  • CDS

danger-secondary-text-color

Deprecated!

Kept to avoid breaking change

$danger-secondary-text-color: $danger-background !default;
Description

Danger variant text color

Type

Color

Author
  • CDS

danger-secondary-text-color-active

Deprecated!

Kept to avoid breaking change

$danger-secondary-text-color-active: kib-core-theme-get('next', 'danger', 900) !default;
Description

Danger variant text color when pressed

Type

Color

Author
  • CDS

transactional-background

Deprecated!

Kept to avoid breaking change

$transactional-background: kib-core-theme-get('next', 'transactional') !default;
Description

Transactional variant background color

Type

Color

Author
  • CDS

transactional-background-hover

Deprecated!

Kept to avoid breaking change

$transactional-background-hover: kib-core-theme-get('next', 'transactional', 300) !default;
Description

Transactional variant background color on hover

Type

Color

Author
  • CDS

transactional-background-focus

Deprecated!

Kept to avoid breaking change

$transactional-background-focus: $transactional-background !default;
Description

Transactional variant background color on focus

Type

Color

Author
  • CDS

transactional-background-active

Deprecated!

Kept to avoid breaking change

$transactional-background-active: kib-core-theme-get('next', 'transactional', 500) !default;
Description

Transactional variant background color when pressed

Type

Color

Author
  • CDS

icon-size

Deprecated!

Kept to avoid breaking change

$icon-size: kib-core-dimensions-get('large') !default;
Description

Size of icon

Type

Number

Author
  • CDS