---
title: React Alert Component Styling
name: Alert Styling
description: Learn how to customize the React Alert component with CSS classes, variables, and SASS for flexible styling and seamless integration into your design.
route: /components/alert/
---

### CSS variables

React Alert supports CSS variables for easy customization. These variables are set via SASS but allow direct overrides in your stylesheets or inline styles.

<ScssDocs file="_alert.scss" capture="alert-css-vars" />

#### How to use CSS variables

```jsx
const customVars = {
  '--cui-alert-color': '#333',
  '--cui-alert-bg': '#f8f9fa',
}

return <CAlert style={customVars}>{/* Alert content */}</CAlert>
```

### SASS variables

<ScssDocs file="_variables.scss" capture="alert-variables" />
