npx gluestack-ui add toastimport { useToast, Toast } from '@/components/ui/toast';


export default () => (
<Toast>
<ToastTitle />
<ToastDescription />
</Toast>
);
| Prop | Type | Default | Description |
|---|---|---|---|
duration | number or null | 5000 | The delay before the toast hides (in milliseconds). If set to null, toast will never dismiss. |
onCloseComplete | ()=> | - | Callback function to run side effects after the toast has closed. |
placement | 'top'| 'top right' | 'top left' | 'bottom' | 'bottom left' | 'bottom right' | bottom | Position of toast on the web page. |
render?: (props: any) | ReactNode | - | Renders a toast component |
avoidKeyboard | bool | false | If true and the keyboard is opened, the Toast will move up equivalent to the keyboard height. |
containerStyle | ViewStyle | - | Container style object for the toast. |
| Name | Value | Default |
|---|---|---|
action | error | warning | success | info | attention | attention |
variant | solid | outline | accent | solid |