> For the complete documentation index, see [llms.txt](https://bricksmotion.gitbook.io/bricksmotion-components/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bricksmotion.gitbook.io/bricksmotion-components/components/image/image-reveal-2.md).

# Image Reveal #2

### Component Structure

* **IR2 - IMG CONTAINER** (Div): This is the central element of the component, designed to house the image and its masking effect. It's styled with the `ir2__img-container` class for relative positioning and overflow control, setting the foundation for the reveal animation.
  * **IR2 - IMG MASK** (Div): Utilizes the `ir2__img-mask` class to create a foreground layer that initially covers the image. This layer is set to scale horizontally from 0 to full width, revealing the image beneath it as the animation progresses.
  * **IR2 - IMG** (Image): The target image for the reveal effect, which fills the container completely thanks to the `ir2__img` class ensuring it's appropriately sized and positioned.

### Animation Structure

**IR2 - SCROLL REVEAL**

This timeline defines the scroll-triggered animation sequence for the Image Reveal #2 component, consisting of animations that gradually uncover the image as the user scrolls:

1. **Mask Reveal Animation**: Targets the `.ir2__img-mask` within the `.ir2__img-container`, scaling it horizontally from 0 (completely hidden) to 1 (fully visible) over 0.5 seconds. This animation creates the effect of the image being revealed from left to right.
2. **Image Fade-in Animation**: Before the mask starts revealing the image, the `.ir2__img` itself transitions from completely transparent (`autoAlpha: 0`) to fully opaque (`autoAlpha: 1`) in a quick 0.1-second animation. This ensures the image is ready and visible as soon as the mask begins to move.
3. **Mask Completion Animation**: Ensures that the mask scales fully across the image, solidifying the reveal effect. This last step confirms the image is entirely visible after the scroll-triggered animation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bricksmotion.gitbook.io/bricksmotion-components/components/image/image-reveal-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
