When to use it
Render one viewport at the app root and show toasts through its queue. Keep messages short and actions optional.
Stack timed notifications above the app inside the safe area.
Native example
Render one viewport at the app root and show toasts through its queue. Keep messages short and actions optional.

Captured exampleExpo web renderer
Open interactive previewimport type { ReactNode } from 'react'
import { View } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { LumenButton, LumenToastViewport, useToast } from '@santi020k/lumen-react-native'
export const AppShell = ({ children }: { children: ReactNode }) => {
const toast = useToast()
const insets = useSafeAreaInsets()
return (
<View style={{ flex: 1 }}>
{children}
<LumenButton
onPress={() =>
toast.create({
action: { label: 'Undo', onPress: () => undefined },
description: 'Three files moved to the archive.',
title: 'Archived'
})
}
>
Archive
</LumenButton>
<LumenToastViewport insets={insets} toast={toast} />
</View>
)
}Reference
The primary shared and platform-specific options exposed by LumenToastViewport.
| API | Values or type | Default | Description |
|---|---|---|---|
| placement / maxCount / duration | screen edge / visible toasts / auto-dismiss | bottom-center / 3 / 5000 ms | Render one viewport at the app root and show toasts through its queue. |
Native behavior
Render one viewport at the app root and show toasts through its queue. Keep messages short and actions optional.
Toasts announce by tone, pause while touched, and keep a named dismiss button.
Shared component