Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

Toast

A brief, temporary notification that appears and disappears automatically.

Status
ReadyBuild day 6 of 21
Code
In React
Role
Feedback

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

Transfer successful

Rp500.000 to Andi Pratama

Pastes as editable layers. Shadows are not exported.

import { useState } from "react";
import { Toast } from "@/ui";

export default function ToastDemo() {
  const [open, setOpen] = useState<boolean>(true);

  if (!open) return null;
  return (
    <Toast
      tone="success"
      title="Transfer successful"
      description="Rp500.000 to Andi Pratama"
      actionLabel="Undo"
      onAction={() => setOpen(false)}
      onClose={() => setOpen(false)}
    />
  );
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

type solidfour tones

Transfer successful

Rp500.000 to Andi Pratama

Transfer successful

Rp500.000 to Andi Pratama

Transfer successful

Rp500.000 to Andi Pratama

type subtlefour tones

Transfer successful

Rp500.000 to Andi Pratama

Transfer successful

Rp500.000 to Andi Pratama

Transfer successful

Rp500.000 to Andi Pratama

Pastes as editable layers. Shadows are not exported.

Props

title
string · default none
Required. The short message.
description
string · default none
A second line with detail.
tone
"info" | "success" | "warning" | "danger" · default "info"
Color and icon. The icon is locked per tone.
type
"solid" | "subtle" · default "subtle"
Filled or soft background.
size
"sm" | "md" · default "md"
Vertical padding.
actionLabel, onAction
string, () => void · default none
A text action such as Undo. Both are needed to show it.
onClose
() => void · default none
Shows the close button.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🧰 Type
type
solid or subtle.
📐 Size
size
sm or md.
🎨 Tone
tone
info, success, warning, or danger.
Show Icon Left
None
No prop. The icon is always shown, locked per tone.
Title, Description
title, description
Pass description to show the second line.
Show Button, Button Value
actionLabel, onAction
Both together.
Show Close
onClose
Pass onClose to show the button.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • The action and close buttons are native buttons: Tab focuses them and Enter or Space activates them.

Screen readers

  • Danger uses role=alert and is read at once. The other tones use role=status and are read politely.
  • The close button is named Close notification. Icons are aria-hidden.

What you still need to do

  • Show, stack, and dismiss toasts in your app. This component is only the toast.
  • Auto-dismiss after 5 seconds, or 8 with an action. Danger never auto-dismisses: the user must acknowledge an error.
  • Give the user enough time to reach the action before it goes.

When to use

Confirms the result of an action, like saving or sending.

Do and don't

Do

  • Keep it on screen until the reader dismisses it, or let them turn auto-dismiss off (WCAG 2.2.3 No Timing).
  • Keep the message short and specific to what just happened.

Don't

  • Use for critical errors that require action: use an alert or modal instead.
  • Stack too many toasts at once.

4 of 28 other molecules, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.