Client

alert

fjsf.alert(title, description, cancel, content, data)

Displays a modal alert dialog rendered in NUI and waits for user input.


Parameters

  • title string Alert title displayed at the top.

  • description string Main description text of the alert.

  • cancel boolean | nil Whether the Cancel button should be shown.

    • true / nil – show Cancel button

    • false – hide Cancel button

  • content table List of alert content items rendered inside the alert.

    Alert content item structure

    Each item supports:

    • text string Item title text.

    • description string | nil Optional description text.

    • type string | nil Predefined visual style. Allowed values:

      • success

      • error

      • warning

      • info

    • icon string | nil Custom FontAwesome icon class. Overrides the icon provided by type.

    • iconAnim string | nil Optional icon animation class.

    • color string | nil Custom icon/text color (CSS value).

    • background string | nil Custom background color (CSS value).


iconAnim

Optional animation applied to the alert icon.

Type: string | nil

Allowed values

  • spin

  • spinReverse

  • spinSlow

  • spinPulse

  • pulse

  • beat

  • beatFade

  • fade

  • blinkSoft

  • bounce

  • float

  • orbit

  • shake

  • wiggle

  • tick

  • tiltBreath

  • scan

  • polarFloat

Invalid values are ignored.


  • data table | nil Additional alert configuration.

    Supported fields:

    • blur boolean Enables background blur.

    • size string Alert size. Allowed values:

      • small

      • medium

      • large


Returns

  • boolean true if confirmed, false if cancelled.


Example


closeAlert

Closes the currently open alert programmatically.


Parameters

  • result boolean | nil Result value returned to the awaiting alert promise.


Returns

This function does not return anything.


Example

Last updated