All valid CSS easing are also used as toast easing. e.g. easeIn, easeOut, easeInOut
Typescript
1<PingsToastsProvider animationEase="easeIn">
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider animationEase="easeIn">
2 <App />
3</PingsToastsProvider>
Animation Type
React-Pings support two animation types:
spring (default)
tween
Typescript
1<PingsToastsProvider animationType="spring">
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider animationType="spring">
2 <App />
3</PingsToastsProvider>
Dismissable
Dismissable take boolean type value if true adds dismiss button at the top-right corner of toast. Default is false,
Typescript
1<PingsToastsProvider dismissable={false}>
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider dismissable={false}>
2 <App />
3</PingsToastsProvider>
Icons Visibility
Used to change icons visibility, if visible all icons are visible for every toast and if hidden all icons hidden for every toast.
Types of values accept two types of value:
visibile (default)
hidden
Typescript
1<PingsToastsProvider visibility="visible">
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider visibility="visible">
2 <App />
3</PingsToastsProvider>
Toasts Limit
Any valid number in the range of 10-20 is used as toast limit. Limits numbers of toast visibile at a time on screen. Default is 10.
Typescript
1<PingsToastsProvider toastsLimit={10}>
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider toastsLimit={10}>
2 <App />
3</PingsToastsProvider>
CSS Inline Style
Inline CSS also supported at global level, but with a twist. CSS you pass through props is applied on the container which renders all the toast, not at toast component.
Typescript
1<PingsToastsProvider
2 style={{
3 backgroundColor: "red",
4 }}
5>
6 <App />
7</PingsToastsProvider>
1<PingsToastsProvider
2 style={{
3 backgroundColor: "red",
4 }}
5>
6 <App />
7</PingsToastsProvider>
Components Level Customizations
Components level customizations apply at single component not for all.
Important : Components level customizations are applied at component level, because every type toast may have different type of customizations. It means if you add a icon to success toast, so it is only applied to success toast not at all.
Icons
React-Pings supports for string, emoji, svg, image or even another component as icons.
Inline CSS also supported at global level, but with a twist. CSS you pass through props is applied on the container which renders all the toast, not at toast component.