Atlassian Design System JS behaviour

Section Message

In-content message with icon, optional action and four severities from info to error — Atlassian's way of warning without stopping the flow.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Warning without stopping the flow

The API-token panel of a workspace — pick a severity and the message swaps in place; dismiss it and bring it back.

API token

nabu_live_9f2c····················4e81
Last used today, 14:02

All five appearances

Information, warning, error, success — and discovery, the purple one that points at brand-new features.

Your token works with the v2 API

Calls made with this token count against 600 requests per hour; the counter resets on the hour.

Read the rate limits
This token expires in 7 days

Anything still using it will start failing on the 18th. Rotate it now and update your CI secrets.

Rotate the token
The last call was rejected

The webhook returned 401 at 14:32 — the token in production no longer matches this workspace.

See the failed calls
Token rotated successfully

The new secret was copied to your clipboard and the old one stays valid for the next 24 hours.

View audit log
Try the new board filters

Saved filters are now shared with the whole team — a first for this workspace.

Take a look

Important props

Important props
Prop Type Default What it does
appearance string 'information' information · warning · error · success · discovery; each carries its own icon and tint.
title string null The bold one-line heading above the supporting text.
actions slot null The link or button after the text; like «Read the docs».

Snippet

<section class="atsm" data-tone="warning">
    <span class="atsm-icon" aria-hidden="true">!</span>
    <div>
        <h4>Your API token expires in 7 days</h4>
        <p>Anything still using it will start failing after that.</p>
        <a href="#">Rotate the token</a>
    </div>
</section>

<style>
.atsm { display: flex; gap: 12px; padding: 16px; border-radius: 3px;
        background: #FFFAE6; color: #172B4D; }
.atsm[data-tone='error'] { background: #FFEDEB; }
.atsm-icon { flex: none; display: grid; place-items: center; aspect-ratio: 1; }
.atsm h4 { margin: 0 0 4px; font: 600 14px Inter, system-ui; }
.atsm p { margin: 0 0 8px; font: 400 12px/1.6 Inter, system-ui; }
.atsm a { color: #0C66E4; font: 500 14px Inter, system-ui; }
</style>
// app/Pages/Token.jsx — Inertia page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import TokenNotice from '@/components/TokenNotice';

export default function Token() {
  return (
    <NabuXUIProvider locale="en" linkComponent={Link}>
      <main className="nx-page">
        <TokenNotice />
      </main>
    </NabuXUIProvider>
  );
}
// TokenNotice.jsx — section message: four severities over a settings card
import { useState } from 'react';
import '@nabuxai/ui-core/css';

const SEVERITIES = {
  info: { tint: '#E9F2FF', ink: '#0055CC', title: 'Your token works with the v2 API',
    body: 'Calls made with this token count against 600 requests per hour.', action: 'Read the rate limits' },
  warning: { tint: '#FFFAE6', ink: '#A54800', title: 'This token expires in 7 days',
    body: 'Anything still using it will start failing after that.', action: 'Rotate the token' },
  error: { tint: '#FFEDEB', ink: '#AE2A19', title: 'The last call was rejected',
    body: 'The webhook returned 401 — the token no longer matches this workspace.', action: 'See the failed calls' },
  success: { tint: '#DCFFF1', ink: '#1F845A', title: 'Token rotated successfully',
    body: 'The new secret was copied to your clipboard; the old one stays valid for 24 hours.', action: 'View audit log' },
};

export default function TokenNotice() {
  const [tone, setTone] = useState('warning');
  const msg = SEVERITIES[tone];

  return (
    <>
      <style>{`
        .atsm-panel { display: grid; gap: 1rem; max-inline-size: 26rem; padding: 1.25rem;
                      border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
                      font-family: Inter, system-ui, sans-serif; }
        .atsm-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
        .atsm-seg button { block-size: 1.75rem; padding-inline: .65rem; border: 1px solid #DFE1E6;
                           border-radius: 3px; background: none; cursor: pointer;
                           font: 500 .76rem/1 Inter, system-ui; color: #44546F; }
        .atsm-seg button[aria-pressed='true'] { background: #0C66E4; border-color: #0C66E4; color: #fff; }
        .atsm { display: flex; gap: .75rem; padding: 1rem; border-radius: 3px; align-items: flex-start; }
        .atsm-icon { flex: none; display: grid; place-items: center; inline-size: 1.25rem; aspect-ratio: 1;
                     border-radius: 2px; color: #fff; font: 700 .8rem/1 Inter, system-ui; }
        .atsm h5 { margin: 0 0 .2rem; font: 600 .85rem/1.4 Inter, system-ui; color: #172B4D; }
        .atsm p { margin: 0 0 .5rem; font: 400 .8rem/1.6 Inter, system-ui; color: #172B4D; }
        .atsm a { color: #0C66E4; font: 500 .8rem Inter, system-ui; }
      `}</style>
      <div className="atsm-panel">
        <div className="atsm-seg" role="group" aria-label="Severity">
          {Object.keys(SEVERITIES).map((k) => (
            <button type="button" key={k} aria-pressed={tone === k} onClick={() => setTone(k)}>
              {k}
            </button>
          ))}
        </div>
        {/* Icon square and tint both follow the severity. */}
        <section className="atsm" style={{ background: msg.tint }}>
          <span className="atsm-icon" style={{ background: msg.ink }} aria-hidden="true">!</span>
          <div>
            <h5>{msg.title}</h5>
            <p>{msg.body}</p>
            <a href="#">{msg.action}</a>
          </div>
        </section>
      </div>
    </>
  );
}
<!-- TokenNotice.vue — section message: four severities over a settings card -->
<script setup lang="ts">
import { computed, ref } from 'vue';
import '@nabuxai/ui-core/css';

const severities = {
  info: { tint: '#E9F2FF', ink: '#0055CC', title: 'Your token works with the v2 API',
    body: 'Calls made with this token count against 600 requests per hour.', action: 'Read the rate limits' },
  warning: { tint: '#FFFAE6', ink: '#A54800', title: 'This token expires in 7 days',
    body: 'Anything still using it will start failing after that.', action: 'Rotate the token' },
  error: { tint: '#FFEDEB', ink: '#AE2A19', title: 'The last call was rejected',
    body: 'The webhook returned 401 — the token no longer matches this workspace.', action: 'See the failed calls' },
  success: { tint: '#DCFFF1', ink: '#1F845A', title: 'Token rotated successfully',
    body: 'The new secret was copied to your clipboard; the old one stays valid for 24 hours.', action: 'View audit log' },
};
const tone = ref<keyof typeof severities>('warning');
const msg = computed(() => severities[tone.value]);
</script>

<template>
  <div class="atsm-panel">
    <div class="atsm-seg" role="group" aria-label="Severity">
      <button v-for="(v, k) in severities" :key="k" type="button"
        :aria-pressed="tone === k" @click="tone = k">{{ k }}</button>
    </div>
    <!-- Icon square and tint both follow the severity. -->
    <section class="atsm" :style="{ background: msg.tint }">
      <span class="atsm-icon" :style="{ background: msg.ink }" aria-hidden="true">!</span>
      <div>
        <h5>{{ msg.title }}</h5>
        <p>{{ msg.body }}</p>
        <a href="#">{{ msg.action }}</a>
      </div>
    </section>
  </div>
</template>

<style scoped>
.atsm-panel { display: grid; gap: 1rem; max-inline-size: 26rem; padding: 1.25rem;
              border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
              font-family: Inter, system-ui, sans-serif; }
.atsm-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.atsm-seg button { block-size: 1.75rem; padding-inline: .65rem; border: 1px solid #DFE1E6;
                   border-radius: 3px; background: none; cursor: pointer;
                   font: 500 .76rem/1 Inter, system-ui; color: #44546F; }
.atsm-seg button[aria-pressed='true'] { background: #0C66E4; border-color: #0C66E4; color: #fff; }
.atsm { display: flex; gap: .75rem; padding: 1rem; border-radius: 3px; align-items: flex-start; }
.atsm-icon { flex: none; display: grid; place-items: center; inline-size: 1.25rem; aspect-ratio: 1;
             border-radius: 2px; color: #fff; font: 700 .8rem/1 Inter, system-ui; }
.atsm h5 { margin: 0 0 .2rem; font: 600 .85rem/1.4 Inter, system-ui; color: #172B4D; }
.atsm p { margin: 0 0 .5rem; font: 400 .8rem/1.6 Inter, system-ui; color: #172B4D; }
.atsm a { color: #0C66E4; font: 500 .8rem Inter, system-ui; }
</style>
<!-- TokenNotice.svelte — section message: four severities over a settings card -->
<script lang="ts">
  import '@nabuxai/ui-core/css';

  const severities = {
    info: { tint: '#E9F2FF', ink: '#0055CC', title: 'Your token works with the v2 API',
      body: 'Calls made with this token count against 600 requests per hour.', action: 'Read the rate limits' },
    warning: { tint: '#FFFAE6', ink: '#A54800', title: 'This token expires in 7 days',
      body: 'Anything still using it will start failing after that.', action: 'Rotate the token' },
    error: { tint: '#FFEDEB', ink: '#AE2A19', title: 'The last call was rejected',
      body: 'The webhook returned 401 — the token no longer matches this workspace.', action: 'See the failed calls' },
    success: { tint: '#DCFFF1', ink: '#1F845A', title: 'Token rotated successfully',
      body: 'The new secret was copied to your clipboard; the old one stays valid for 24 hours.', action: 'View audit log' },
  };
  type Tone = keyof typeof severities;
  let tone = $state<Tone>('warning');
  const msg = $derived(severities[tone]);
</script>

<div class="atsm-panel">
  <div class="atsm-seg" role="group" aria-label="Severity">
    {#each Object.entries(severities) as [k] (k)}
      <button type="button" aria-pressed={tone === k} onclick={() => (tone = k as Tone)}>{k}</button>
    {/each}
  </div>
  <!-- Icon square and tint both follow the severity. -->
  <section class="atsm" style:background={msg.tint}>
    <span class="atsm-icon" style:background={msg.ink} aria-hidden="true">!</span>
    <div>
      <h5>{msg.title}</h5>
      <p>{msg.body}</p>
      <a href="#/help/rate-limits">{msg.action}</a>
    </div>
  </section>
</div>

<style>
.atsm-panel { display: grid; gap: 1rem; max-inline-size: 26rem; padding: 1.25rem;
              border: 1px solid #DFE1E6; border-radius: 6px; background: #fff;
              font-family: Inter, system-ui, sans-serif; }
.atsm-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.atsm-seg button { block-size: 1.75rem; padding-inline: .65rem; border: 1px solid #DFE1E6;
                   border-radius: 3px; background: none; cursor: pointer;
                   font: 500 .76rem/1 Inter, system-ui; color: #44546F; }
.atsm-seg button[aria-pressed='true'] { background: #0C66E4; border-color: #0C66E4; color: #fff; }
.atsm { display: flex; gap: .75rem; padding: 1rem; border-radius: 3px; align-items: flex-start; }
.atsm-icon { flex: none; display: grid; place-items: center; inline-size: 1.25rem; aspect-ratio: 1;
             border-radius: 2px; color: #fff; font: 700 .8rem/1 Inter, system-ui; }
.atsm h5 { margin: 0 0 .2rem; font: 600 .85rem/1.4 Inter, system-ui; color: #172B4D; }
.atsm p { margin: 0 0 .5rem; font: 400 .8rem/1.6 Inter, system-ui; color: #172B4D; }
.atsm a { color: #0C66E4; font: 500 .8rem Inter, system-ui; }
</style>