React callout component provides presentation of content in a visually distinct manner. Includes a heading, icon and typically text-based content.
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.
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 | - |