~/docs/api

API

sileo fires and controls toasts from anywhere. Every shortcut returns the toast id, and promise returns the promise it was given.

sileo

success(options)
string
A green success toast.
error(options)
string
A red error toast.
warning(options)
string
An amber warning toast.
info(options)
string
A blue info toast.
action(options)
string
A toast meant to carry a button.
show(options)
string
A toast in the state given by its type option, success when none is given.
promise(promise, options)
Promise<T>
Loading while the promise is pending, then success, action, or error.
dismiss(id)
void
Dismiss one toast.
clear(position?)
void
Clear every toast, or only those at one position.
Like sileo on the web, every toast shares one id. A new toast does not stack on the last one; it morphs the visible toast into the new content.
sileo.info({ title: 'Uploading' }); // a moment later, the same toast becomes: sileo.success({ title: 'Uploaded' });
Run
Copy

Options

title
string
= state
The heading.
description
ReactNode
The body of the card. A string is wrapped in Text; any node is rendered as given.
position
SileoPosition
Override the Toaster’s position.
duration
number | null
= 6000
Milliseconds before it dismisses itself. null keeps it until dismissed.
icon
ReactNode | null
Replaces the state icon. An element without a color prop is given the state color.
fill
string
The surface color. Overrides the theme.
roundness
number
= 16
Corner radius, which also sets how far the goo blurs.
appearance
'solid' | 'glass'
Overrides the Toaster’s appearance.
styles
SileoStyles
Style objects for title, description, badge, button and buttonText.
autopilot
boolean | { expand, collapse }
= true
Open and close the card on a timer. false leaves it to the reader.
button
SileoButton
One button, the web shape.
buttons
SileoButtons
One to four buttons.
buttonLayout
'row' | 'column'
= 'row'
Side by side, or stacked.

Promise options

loading
SileoOptions
Shown while the promise is pending. Never dismisses itself.
success
SileoOptions | (data) => SileoOptions
Shown when it resolves.
error
SileoOptions | (err) => SileoOptions
Shown when it rejects.
action
SileoOptions | (data) => SileoOptions
Shown instead of success when given.
position
SileoPosition
Where the whole flow plays. Without it, the loading toast’s position, then the Toaster’s.
The toast from sileo, ported to React Native. Built in the open by rayanstudio.
© 2026 rayan · MIT License
A native port of sileo by hiaaryan