Support CoreUI Development

CoreUI is an MIT-licensed open source project and is completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

You can support our Open Source software development in the following ways:

  • Buy the CoreUI PRO, and get access to PRO components, and dedicated support.
  • Became a sponsor, and get your logo on BACKERS.md/README.md files or each site of this documentation
  • Give us a star ⭐️ on Github.

Callout

Callouts provide presentation of content in a visually distinct manner. Includes a heading, icon and typically text-based content.

Examples

Callout component is prepared for any length of text, as well as an optional elements like icons, headings, etc. For a styling, use one of the required contextual classes (e.g., .callout-success).

New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
<div class="callout callout-primary">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-secondary">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-success">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-danger">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-warning">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-info">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-light">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>
<div class="callout callout-dark">
  New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background, terminology, guidelines, and code snippets.
</div>

Conveying meaning to assistive technologies

Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .visually-hidden class.

Customizing

CSS Variables

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

  --cui-callout-padding-x: #{$callout-padding-x};
  --cui-callout-padding-y: #{$callout-padding-y};
  --cui-callout-margin-x: #{$callout-margin-x};
  --cui-callout-margin-y: #{$callout-margin-y};
  --cui-callout-border-width: #{$callout-border-width};
  --cui-callout-border-color: #{$callout-border-color};
  --cui-callout-border-left-width: #{$callout-border-left-width};
  --cui-callout-border-radius: #{$callout-border-radius};
  

SASS variables

$callout-padding-y:                 $spacer;
$callout-padding-x:                 $spacer;
$callout-margin-y:                  $spacer;
$callout-margin-x:                  0;
$callout-border-radius:             $border-radius;
$callout-border-width:              $border-width;
$callout-border-color:              $border-color;
$callout-border-left-width:         (4 * $callout-border-width);

$callout-variants: (
  "primary":    $primary,
  "secondary":  $secondary,
  "success":    $success,
  "danger":     $danger,
  "warning":    $warning,
  "info":       $info,
  "light":      $light,
  "dark":       $dark
);

Variants

Check out our Sass maps and loops docs for how to customize these loops and extend CoreUI’s base-modifier approach to your own code.

Modifiers

CoreUI’s callout component is built with a base-modifier class approach. This means the bulk of the styling is contained to a base class .callout while style variations are confined to modifier classes (e.g., .callout-danger). These modifier classes are built from the $callout-variants map to make customizing the number and name of our modifier classes.

// Generate contextual modifier classes for colorizing the collor.
@each $state, $value in $callout-variants {
  .callout-#{$state} {
    --cui-callout-border-left-color: #{$value};
  }
}