Documentation
Components
Alert

Alert

The Alert component is a versatile component that displays a message to the user with various customization options. It supports different severity levels, variants, colors, and additional actions.

Installation

Install the package

npm i @start-base/start-ui

Add the styles

To use the React form elements styles in a Next.js project, import the styles in your layout.tsx file.

app/layout.tsx
import "@start-base/start-ui/styles.css";

Import the component

import Alert from '@start-base/start-ui/Alert';

Usages

Alert With Severity

Alert With Variant

Alert With Color

Alert With Action

Alert With Title

API

NameTypeDefaultVariantsDescription
childrenstringChildren of the alert
severitystringsuccesssuccess info warning errorSeverity of the alert
variantstringdefaultdefault filled outlinedVariant of the alert
colorstringinheritinherit success info warning errorColor of the alert
actionElementobjectAction element of the alert
iconbooleantrueIcon of the alert
alertTitlebooleantrueAlert title of the alert
openbooleantrueOpen of the alert
classNamestringClassname of the alert
iconClassNamestringIconClassName of the alert
bodyClassNamestringBodyClassName of the alert
titleClassNamestringTitleClassName of the alert
textClassNamestringTextClassName of the alert