Toast

Organism

Kısa süreli bildirim kartı. success/warning/error/info/loading varyantları; title, message ve action desteği.

Success

Preview

File uploaded

report.pdf has been uploaded successfully.

Code
<%- include('modules/ui/Toast', {
  variant: 'success',
  title: 'File uploaded',
  message: 'report.pdf has been uploaded successfully.'
}) %>

Error

Preview

Upload failed

The file exceeds the 10 MB size limit.

Code
<%- include('modules/ui/Toast', {
  variant: 'error',
  title: 'Upload failed',
  message: 'The file exceeds the 10 MB size limit.',
  actionLabel: 'Try again'
}) %>

Warning

Preview

Session expires in 5 minutes.

Code
<%- include('modules/ui/Toast', {
  variant: 'warning',
  message: 'Session expires in 5 minutes.'
}) %>

Info

Preview

New update

Version 2.4 is available. Refresh to apply.

Code
<%- include('modules/ui/Toast', {
  variant: 'info',
  title: 'New update',
  message: 'Version 2.4 is available. Refresh to apply.'
}) %>

Loading

Preview

Saving your changes…

Code
<%- include('modules/ui/Toast', {
  variant: 'loading',
  message: 'Saving your changes…',
  persistent: true
}) %>
Source modules/ui/Toast.ejs