Skip to content

Yoyo Loading State Builder API

POST https://api.findutils.com/api/tools/yoyo-loading-state-builder/execute

Build Yoyo PHP "yoyo:spinning" loading-state attributes and a ready-to-paste HTML snippet. Choose show/hide, add class, remove class, set attribute, or a combination, with optional delay and target actions.

Request body

application/json
  • behavior

    string optional

    Loading behavior. Default: "show-hide". One of show-hide · add-class · remove-class · set-attr · combination. Default "show-hide".

  • class_name

    string optional

    CSS class for "add-class" or "remove-class" (e.g. "opacity-50").

  • attribute

    string optional

    Attribute for "set-attr" (e.g. "disabled").

  • use_delay

    boolean optional

    Add yoyo:spinning.delay. Default: false. Default false.

  • delay_ms

    integer optional

    Delay in milliseconds when use_delay is true. Default: 300. Default 300.

  • target_actions

    string optional

    Comma-separated action names for yoyo:spin-on (e.g. "save,submit").

  • add_class_name

    string optional

    For "combination": class to add.

  • remove_class_name

    string optional

    For "combination": class to remove.

  • add_attribute

    string optional

    For "combination": attribute to set.

Example arguments

Verified
{
  "behavior": "add-class",
  "class_name": "opacity-50",
  "use_delay": true,
  "delay_ms": 200
}