Skip to content

Getting Started

Install

Terminal window
bun add expo-toast

Import the API

import { toast } from 'expo-toast';

Show your first toast

toast.success('Profile saved');

Typical flow: loading -> success/error

const id = toast.loading('Saving profile...');
try {
await saveProfile();
toast.update(id, {
variant: 'success',
message: 'Profile saved',
duration: 'short',
});
} catch (error) {
toast.update(id, {
variant: 'error',
message: `Save failed: ${String(error)}`,
duration: 'long',
});
}

Promise helper

await toast.promise(saveProfile(), {
loading: 'Saving profile...',
success: 'Profile saved',
error: (err) => `Save failed: ${String(err)}`,
});

Check runtime support (optional)

You can call the API unconditionally, but if you want custom fallback UI:

if (!toast.isSupported()) {
// Show alternate UI for unsupported runtimes.
}

Next step

Continue with Using the Toast Module.