• Getting Started
  • Components
  • Github
  • Go pro
energyGetting started
  • Introduction
dComponents
  • Button Components
  • Grid Components
  • Input Components
  • Layout Components
  • Toast Components
  • Widget Components
  • Alert
  • Badge
  • Breadcrumb
  • Callout
  • Card
  • Carousel
  • Charts
  • Collapse
  • CreateElement
  • DataTable
  • Dropdown
  • ElementCover
  • Embed
  • Fade
  • Form
  • Icon
  • Img
  • Jumbotron
  • Link
  • ListGroup
  • Media
  • Modal
  • Nav
  • Navbar
  • Pagination
  • Popover
  • Progress
  • Spinner
  • Switch
  • Tabs
  • Toggler
  • Tooltip

Alert

React alerts give contextual feedback information for common user operations. Component is delivered with a bunch of usable and adjustable alert messages.


Usage

Example

CAlert
CAlert
I am an dismissible alert!

Script


  return (
    <div className="mt-2">
      <CAlert color="primary">CAlert</CAlert>
      <CAlert color="secondary">CAlert</CAlert>
      <CAlert color="info" closeButton>
        I am an dismissible alert!
      </CAlert>
    </div>
  )
  


# Features

  • Temporary or constant visibility
  • Optionally dismissible by user
  • Optional fading effect
  • When visible temporary timer can be tracked and displayed (i.e. via Progress component)

# Alert API

NameRequiredTypeDefault Value
childrenany
main tag content
classNamestring
user classes for the main HTML tag
innerRef(object | Function | string)
ref to the main tag
onShowChangeFunction
on show change event callback
closeButtonboolean
show close button
colorstring
defines background color of the alert
fadebooleantrue
fade effect
show(boolean | number)true
show state of the component

  • Components
    • Usage
      • Features
      • API
CoreUI © 2020 creativeLabs.core-logo