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.

React Callout Component

React callout component provides presentation of content in a visually distinct manner. Includes a heading, icon and typically text-based content.

Other frameworks

CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and Vue components. To learn more please visit the following pages.

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 props (e.g., color="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.
1<CCallout color="primary">
2 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
3 terminology, guidelines, and code snippets.
4</CCallout>
5<CCallout color="secondary">
6 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
7 terminology, guidelines, and code snippets.
8</CCallout>
9<CCallout color="success">
10 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
11 terminology, guidelines, and code snippets.
12</CCallout>
13<CCallout color="danger">
14 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
15 terminology, guidelines, and code snippets.
16</CCallout>
17<CCallout color="warning">
18 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
19 terminology, guidelines, and code snippets.
20</CCallout>
21<CCallout color="info">
22 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
23 terminology, guidelines, and code snippets.
24</CCallout>
25<CCallout color="light">
26 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
27 terminology, guidelines, and code snippets.
28</CCallout>
29<CCallout color="dark">
30 New to or unfamiliar with flexbox? Read this CSS Tricks flexbox guide for background,
31 terminology, guidelines, and code snippets.
32</CCallout>
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#

React 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.

1--cui-callout-padding-x: #{$callout-padding-x};
2--cui-callout-padding-y: #{$callout-padding-y};
3--cui-callout-margin-x: #{$callout-margin-x};
4--cui-callout-margin-y: #{$callout-margin-y};
5--cui-callout-border-width: #{$callout-border-width};
6--cui-callout-border-color: #{$callout-border-color};
7--cui-callout-border-left-width: #{$callout-border-left-width};
8--cui-callout-border-radius: #{$callout-border-radius};

How to use CSS variables#

1const vars = {
2 '--my-css-var': 10,
3 '--my-another-css-var': "red"
4}
5return <CCallout style={vars}>...</CCallout>

SASS variables#

1$callout-padding-y: $spacer;
2$callout-padding-x: $spacer;
3$callout-margin-y: $spacer;
4$callout-margin-x: 0;
5$callout-border-radius: $border-radius;
6$callout-border-width: $border-width;
7$callout-border-color: $border-color;
8$callout-border-left-width: (4 * $callout-border-width);
9
10$callout-variants: (
11 "primary": $primary,
12 "secondary": $secondary,
13 "success": $success,
14 "danger": $danger,
15 "warning": $warning,
16 "info": $info,
17 "light": $light,
18 "dark": $dark
19);

API#

CCallout#

1import { CCallout } from '@coreui/react'
2// or
3import CCallout from '@coreui/react/src/components/callout/CCallout'
PropertyDescriptionTypeDefault
classNameA string of all className you want applied to the base component.string-
colorSets the color context of the component to one of CoreUI’s themed colors.'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string-