Notification

notification.success()TailwindCSS Modules

Imperative toast API with Coloxo spring enter/exit on by default. Trigger from the canvas — notifications appear on the full page at the configured placement.

InstallationColoxo CLI
npx coloxo add notification --style coloxo-css
ES Module ImportPlayground / npm package
import { notification, NotificationProvider } from '@coloxo/ui';

Design Tokens:

--cx-z-notification: 600--cx-color-bg-primary: #FFFFFF--cx-shadow-lg--cx-radius-xl: 20px

1. Interactive Configurator

Use the canvas trigger to fire notifications on the whole page. Placement, animation, and stacking follow the controls.

Animated

Show Progress Bar

Visual Render CanvasPLACEMENT: TOPRIGHT · ANIMATED: ON

Notifications render on the full page at the configured placement — click repeatedly to stack more.

tsx
notification.success({  title: "Payment received",  description: "Invoice settled successfully.",});

2. Dark theme

Notifications inherit the application color scheme and still use the full-page viewport.

Renders on the page at bottom-right.

Accessibility

ARIA Roles

Notifications use role='alert' or role='status' depending on severity.

Reduced motion

Enter/exit animations collapse when prefers-reduced-motion is set.

Pause on Hover

Timers pause while users hover or focus the notification.

Props

NameTypeDefaultDescription
durationnumber | false4500Auto-close delay in ms; false/0 stays open.
placement"top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight"topRightViewport corner (Ant Design).
title / messageReactNode—Heading; message is the Ant Design alias.
descriptionReactNode—Supporting content.
actions / btnReactNode—Custom action group; btn is deprecated.
action{ label, onClick }—Legacy single text action.
key / idstring—Stable id; same key updates the notification.
iconReactNode | null—Custom icon; null hides.
closableboolean | { closeIcon?, onClose? }trueClose control.
closeIconReactNode | false | null—Custom close icon; false/null hides.
showProgressboolean—Progress bar for auto-close.
layout"default" | "avatar" | "image" | "progress"—Untitled-style layout; inferred from avatar/image/progress when omitted.
avatarReactNode | { src?, alt?, initials?, status?, size? }—Leading avatar (avatar layout).
imageReactNode | { src, alt? }—Leading 64px thumbnail (image layout).
progressnumber | { value, max?, label?, showValue? }—In-card determinate bar; duration defaults to false when unset.
notification.avatar / image / progressfn—Convenience open helpers for Untitled layouts.
pauseOnHoverbooleantruePause timer while hovered.
animatedboolean | { enabled?, delay? }trueColoxo spring enter/exit (scale + opacity). false disables; { delay } staggers enter in ms.
stackboolean | { threshold }{ threshold: 3 }Collapse when count exceeds threshold.
maxCountnumber—Drop oldest when exceeded.
top / bottomnumber24Viewport offset in px.
notification.open / destroyfn—open(config); destroy(key?) clears one or all.