Skip to content

ftxNotify

Shows a notification/toast message.

Parameters

  • options (Object | String) - Notification options or message string
    • message (String) - Notification message (required if options is object)
    • type (String) - Notification type: 'positive', 'negative', 'warning', 'info' (default: 'info')
    • position (String) - Position: 'top', 'bottom', 'left', 'right', 'top-left', etc. (default: 'top')
    • timeout (Number) - Auto-close timeout in ms (default: 5000)
    • actions (Array) - Action buttons
    • $q (Object) - Optional Quasar instance

Returns

Notification instance

Usage

Simple Notification

javascript
import { ftxNotify } from '@ftx/ui';

ftxNotify('Operation completed!');

With Options

javascript
import { ftxNotify } from '@ftx/ui';

ftxNotify({
  message: 'Item saved successfully',
  type: 'positive',
  position: 'top-right',
  timeout: 3000
});

With Actions

javascript
import { ftxNotify } from '@ftx/ui';

ftxNotify({
  message: 'Item deleted',
  type: 'negative',
  actions: [
    { label: 'Undo', handler: () => undoDelete() }
  ]
});

Different Types

javascript
import { ftxNotify } from '@ftx/ui';

// Success
ftxNotify({ message: 'Success!', type: 'positive' });

// Error
ftxNotify({ message: 'Error occurred', type: 'negative' });

// Warning
ftxNotify({ message: 'Warning', type: 'warning' });

// Info
ftxNotify({ message: 'Information', type: 'info' });

Released under the MIT License.