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:
React callout component provides presentation of content in a visually distinct manner. Includes a heading, icon and typically text-based content.
CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and Vue components. To learn more please visit the following pages.
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"
).
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>
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.
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};
1const vars = {2 '--my-css-var': 10,3 '--my-another-css-var': "red"4}5return <CCallout style={vars}>...</CCallout>
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);910$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": $dark19);
1import { CCallout } from '@coreui/react'2// or3import CCallout from '@coreui/react/src/components/callout/CCallout'
Property | Description | Type | Default |
---|---|---|---|
className | A string of all className you want applied to the base component. | string | - |
color | Sets the color context of the component to one of CoreUI’s themed colors. | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string | - |