If you like this project and want to help us, please give us a star ⭐️ on Github. ➡️ Star 🙏
View 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

SASS

$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} {
    @include ltr-rtl("border-left-color", var(--#{$variable-prefix}callout-border-left-color, $value));
  }
}

CSS Vars

--cui-callout-border-color
--cui-callout-border-left-color
--cui-callout-border-left-width
--cui-callout-border-width