A perfect example of what we want for the standalone Toast control is like this one: https://github.com/Blazored/Toast
I am using Blazored Toast control which is an open source, so no problem about that. But, it will be nice to stick to one library rather than using many different nuget packages for UI purpose. So, I would like to see such control in Telerik Suite.
Additional features I'd like to see are:
You can use the font icons from the Kendo suite in Blazor as well, as the SASS themes are shared. Here's an example:
@
using
Telerik.Blazor
@
using
Telerik.Blazor.Components.AnimationContainer
@
using
Telerik.Blazor.Components.Button
<TelerikButton OnClick=
"@Show"
>Show Notification</TelerikButton>
<div style=
"position: absolute; top: 50%; left: 50%"
>
<TelerikAnimationContainer @
ref
=
"@AnimationContainer"
Width=
"300px"
Height=
"200px"
AnimationType=@AnimationType.Fade>
<div
class
=
"k-widget k-popup k-notification k-notification-info"
>
<div
class
=
"new-mail"
>
<h3><span
class
=
"k-icon k-i-info"
></span>New E-mail</h3>
<p>
<span
class
=
"k-icon k-i-info"
></span>
You have 1
new
mail message!
</p>
</div>
</div>
</TelerikAnimationContainer>
</div>
@code {
public
TelerikAnimationContainer AnimationContainer {
get
;
set
; }
public
async
void
Show(UIMouseEventArgs args)
{
await AnimationContainer.ShowAsync();
StateHasChanged();
await Task.Delay(2000);
await AnimationContainer.HideAsync();
StateHasChanged();
}
}
<style type=
"text/css"
>
.
new
-mail .k-icon {
font-size: inherit;
/* this will make the icon large as its text container
and you may want to tweak this further with different/more specific rules
*/
}
</style>
On a close button - you just need to add an element whose click will call AnimationContainer.HideAsync().
I hope this helps you move forward for the time being.
Considering that most of these features can easily be achieved with the current components, I am not sure if this will be implemented soon, or if at all, yet I am going to keep it open so we can gather the community feedback and interest. As usual, if sufficient public interest is accrued, its priority will rise.
You can use the AnimationContainer component for this, as shown in this demo: https://demos.telerik.com/blazor-ui/animationcontainer/notification.
What are the other features you would like to see in a standalone component of this type that cannot be done with this approach?