Kinetic Alert

An inline banner with a tone icon, a title and a message, with an optional dismiss button and a mode-specific entrance.

  • <kt-kinetic-alert>
  • Feedback
  • No framework

Kinetic Alert

The dashboard will be read-only on Sunday from 02:00 to 02:30 UTC.Your profile was updated and is now visible to your team.You have used 92% of your plan. Remove old files or upgrade to keep uploading.We could not charge the card ending in 4242. Update your billing details and try again.

The code

Copy the Kinetic Alert

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-alert tone="info" title="Scheduled maintenance">The dashboard will be read-only on Sunday from 02:00 to 02:30 UTC.</kt-kinetic-alert>

<kt-kinetic-alert tone="success" title="Changes saved" dismissible>Your profile was updated and is now visible to your team.</kt-kinetic-alert>

<kt-kinetic-alert tone="warning" title="Storage almost full">You have used 92% of your plan. Remove old files or upgrade to keep uploading.</kt-kinetic-alert>

<kt-kinetic-alert tone="error" title="Payment declined" dismissible>We could not charge the card ending in 4242. Update your billing details and try again.</kt-kinetic-alert>

Attributes

NameWhat it doesDefault
tone"info", "success", "warning" or "error".info
titleBold first line (optional).—
dismissibleShow a close button. It hides the alert and fires "dismiss".—

Keyboard and screen readers

  • Error and warning use role="alert" so they are announced at once; info and success use role="status" and are announced politely.
  • The icon is decorative; the tone is also carried by the title and message, never by color alone.
  • The close button is keyboard reachable, and Escape closes the alert while focus is inside it.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Alert: questions answered

How do I use the Kinetic Alert?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-alert>.

Which attributes does <kt-kinetic-alert> accept?

tone, title, dismissible. Each one is described in the attributes table on this page.

Is the Kinetic Alert accessible?

Error and warning use role="alert" so they are announced at once; info and success use role="status" and are announced politely. The icon is decorative; the tone is also carried by the title and message, never by color alone. The close button is keyboard reachable, and Escape closes the alert while focus is inside it.

Can I change the Kinetic Alert colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.