Skip to main content

toast

caution

All props/parameters are optional unless they are marked with an asterisk ( * ).

Example

import { common } from "replugged";
const { toast } = common;

toast.toast("Toast text", toast.Kind.FAILURE, { duration: 5000 });

Enums

EnumDescription
toast.KindToast types
MESSAGE | SUCCESS | FAILURE | CUSTOM | CLIP
toast.PositionToast positions
TOP | BOTTOM

Functions

NameParametersReturn TypeDescription
toast* content: string | ReactElement | null
kind: toast.Kind
opts: ToastOptions
voidMakes a toast appear on the screen; toast.Kind.SUCCESS is the default type

Types

ToastOptions

NameTypeDefaultDescription
componentReactElementCustom toast component
durationnumber3000How long the toast stays on the screen in milliseconds
positiontoast.Positiontoast.Position.TOPToast position