Framework:
  • JavaScript / Vanilla JS
  • React.js
  • Vue.js
On this page

    ## Examples ### Colors Angular Alert is prepared for any length of text, as well as an optional close button. For a styling, use one of the **required** contextual `color` props (e.g., `primary`). For inline dismissal, use the [dismissing prop](#dismissing).
    ### Link color Use the `cAlertLink` directive class to quickly provide matching colored links within any alert.
    ### Additional content Alert can also incorporate supplementary HTML elements like heading with `cAlertHeading`, paragraph, and divider.
    ### Dismissing Alerts can also be easily dismissed. Just add the `dismissible` prop and `fade` for animation. To remove an alert from the DOM, you can use `*ngIf` directive.
    ### Custom template Use `alertButtonCloseTemplate` to customize close button.
    ### Icons You can use Icons and flexbox utilities to create alerts with icons.
    --- ## API reference ### Alert Module
    --- ### c-alert _component_ ##### Inputs
    | name | description | type | default | | ---- | ----------- | ---- | ------- | | `color` | Sets the color context of the component| `string` | `'primary'` | |`dismissible`| adds a close button to alert for self dismiss | `boolean`|_false_ |`fade`| adds optional animation for dismissible alert|`boolean`|_false_| |`variant`| Set the alert variant to a solid | `string: 'solid'` |_undefined_| |`visible`| toggle visibility of alert component|`boolean`|_true_|
    ##### Outputs
    | name | description | type | | ---- | ----------- | ---- | | `visibleChange` | Event triggered on the alert dismiss. | `boolean` |
    ### cAlertHeading _directive_ ### cAlertLink _directive_
    • GitHub
    • Twitter
    • Support
    • CoreUI (Vanilla)
    • CoreUI for React.js
    • CoreUI for Vue.js

    CoreUI for Angular is Open Source UI Components Library for Angular.

    Currently v5.6.8 Code licensed MIT , docs CC BY 3.0 .
    CoreUI PRO requires a commercial license.

    Advertisement