Hide Image

Remove an image from the screen

Description

'hide image <image_id> [at <position>] [with <animation> [classes] [properties]]'

The hide image action removes an image from the screen. The image must have been previously shown using Show Image.

Action ID: Hide::Image

Reversible: Yes

Requires User Interaction: No

Parameters

Name
Type
Description

image_id

string

The asset ID or filename used when showing the image

position

string

Optional. CSS class for repositioning before hiding

animation

string

Optional. Exit animation from Animate.css

classes

string

Optional. Additional CSS classes

properties

string

Optional. Properties like duration

Properties

Property
Description

duration

Sets animation-duration CSS property. Format: duration <time> (e.g., duration 2s)

Examples

Basic Hide

Remove an image immediately without animation:

Hide with Animation

Remove with an exit animation:

Hide with Duration

Control how long the animation takes:

Hide with Position Change

Move the image before hiding:

Using Filename

If the image wasn't declared as an asset:

Animation Behavior

When hiding with an animation:

  1. The image's data-visibility attribute is set to invisible

  2. The animation plays

  3. Once the animation ends, the element is removed from the DOM

This ensures the animation completes before the image disappears.

Complete Example

Last updated

Was this helpful?