Components general

Toast

Event‑driven notification receiver that renders animated floating toasts. Place it on any page to receive notifications triggered by button scripts (e.g., <code>context.toast.success('msg')</code>) or predefined <code>showMessage</code> actions. Position, duration, and styling can be configured.

Actualizado Mar 6, 2026

Toast

Event‑driven notification receiver that renders animated floating toasts. Place it on any page to receive notifications triggered by button scripts (e.g., context.toast.success('msg')) or predefined showMessage actions. Position, duration, and styling can be configured.

Use Cases

  • Success notifications after saving or submitting data
  • Error messages when API calls or operations fail
  • Warning alerts triggered by validation or business logic
  • Info notifications for status updates from button scripts
  • Custom notification styling (position, duration, icons) for any app

Properties

items

Demo notification items shown in the editor preview only. In preview/published mode, toasts are received dynamically via events from button scripts and predefined actions. Type: array. Default: none.

position

Screen corner where toasts appear. Type: string. Options: top-right, top-left, bottom-right, bottom-left, top-center, bottom-center. Default: top-right

duration

Auto‑dismiss delay in seconds. Set 0 to require manual dismissal. Type: number. Default: 5

showIcon

Show type‑specific icon (checkmark, X, warning triangle, info circle). Type: boolean. Default: true

customCss

Custom CSS styles. Type: string. Default: none

Best Practices

  • Place one Toast component per page to enable notifications
  • Use context.toast.success('msg') in button custom scripts to trigger notifications
  • Use predefined showMessage action for simple notification triggers without custom code
  • Set position to top-right (standard) or bottom-right for dashboard apps
  • Keep duration at 5 seconds default – long enough to read, short enough not to annoy
  • The items array is for editor preview only – keep 1‑2 examples or leave empty

Common Mistakes

Not placing a Toast component on the page

Why it's a problem: Without a Toast component, context.toast calls fall back to generic browser toasts instead of custom styled ones.

Fix: Add page.Toast({ position: 'top-right', duration: 5 }) to every page that uses toast notifications.

Using context.alert() for transient feedback instead of context.toast

Why it's a problem: alert() shows a modal dialog that blocks the user. Toast shows a non‑blocking notification that auto‑dismisses.

Fix: Use context.toast.success('Saved!') for transient feedback. Reserve context.alert() for critical messages requiring acknowledgment.

Etiquetas

toast sections success notifications error messages warning alerts

Componentes relacionados

¿Listo para crear?

Comienza a crear tu aplicación de forma gratuita con Qödiak.

Comenzar gratis

Artículos relacionados

AnimatedGradient

Smooth animated gradient background for modern, premium aesthetics. Supports linear and radial gradients with configurable colors, animation speed, and intensity. GPU‑accelerated for smooth 60fps performance.

Button

Interactive button component that supports link navigation, page data source operations (record navigation, new record, mode switching), form submission, and custom JavaScript execution. Save/Delete actions must use a custom‑script with navigation. Two visual variants are available, and the button can be enabled or disabled dynamically based on data context.

Calendar

A full‑featured calendar component built with react‑big‑calendar. It can display events in month, week, day, or agenda views and includes navigation and view‑switching capabilities, making it suitable for any site that needs scheduling, event management, or date visualization.

Card

Feature card component with an icon, title, description, and entrance animations. Ideal for showcasing features, services, or benefits in grid layouts with animation support.

Checkbox

A checkbox group component that lets users select multiple options from a predefined list. It renders a set of checkboxes with individual labels and can be arranged vertically or horizontally.

CountdownTimer

Real-time countdown timer component that displays the time remaining until a target date/time. It updates every second, offers customizable formatting, and shows a completion message when the countdown ends. Suitable for any site type.