I understand about using hover and filters, but can I have one image rollover to a second image on hover?
Playing with AIâŚ
Get tin the sandbox and have fun.
Got it! Youâre looking to create an image rollover effect where one image changes to a second image when you hover over it, and you want to do this using only the Custom Interaction feature in Blocs 6 â no custom code.
Hereâs how you can achieve this using just the Custom Interaction panel with hover actions:
Step-by-Step: Image Rollover on Hover using Custom Interaction
1. Add Two Images to Your Page
-
Insert two images in the desired location on your Blocs page.
-
Youâll need to place them on top of each other so that only one image is visible at a time.
-
Tip: If using Columns or a Bloc, you can place both images within the same container (so they share the same space).
2. Make the Second Image Hidden Initially
- Select the second image (the one that will appear on hover).
- In the Right Sidebar Inspector on the right, set its Opacity to
0%so it is hidden by default. - This will make sure the second image starts off invisible.
3. Open the Interactions Panel
- Select the first image (the one thatâs visible by default).
- In the Right Sidebar, open the Interactions panel.
4. Set the Trigger to Hover
- Click the â+â button to add a new interaction.
- For the Trigger, select âHoverâ from the dropdown. This means the interaction will activate when the user hovers over the first image.
5. Set the Action to Show the Second Image
-
In the Action dropdown, select âShowâ.
-
Under the Target, select âNext Siblingâ or âSelect by Classâ (depending on how youâve structured the layout):
- If the second image is directly next to the first image in the DOM, choose Next Sibling.
- If the second image has a class (e.g.,
second-image), you can select it from the class list.
6. Set the Reverse Action for Hover Out
- Now you need to specify what happens when the hover effect is removed (i.e., when the mouse moves away from the first image).
- Click the â+â again to add a second interaction.
- This time, for the Trigger, select âHover Outâ.
- For the Action, select âHideâ to make the second image invisible again.
- Again, use Next Sibling or Select by Class to target the second image.
7. Set the Second Image to Appear Smoothly
- Go back to the second image (the one that becomes visible on hover).
- You might want to apply a fade-in transition to make the image appear smoothly.
- In the Right Sidebar Inspector, set the Opacity of the second image to
100%when itâs shown, and make sure its opacity is0%by default.
8. Preview the Effect
- Hit Preview (
â + Por click the Preview button) and hover over the first image. - When you hover, the first image should fade out and the second image should fade in.
Adjusting the Timing
If you want to make the rollover smoother, you can add transitions to the Opacity or Transform properties of the images:
-
Select the first image:
-
In the Right Sidebar Inspector, set the transition property for opacity and/or transform. For example:
- Transition: opacity 0.3s ease (this will control how quickly it fades out).
-
-
Select the second image:
- Similarly, set the transition for opacity so that the second image fades in smoothly.
Recap
To sum it up:
- You used the Hover trigger on the first image.
- The Show action revealed the second image when hovered.
- The Hide action was triggered when the hover was removed (hover out).
- Both images had opacity transitions set up for a smooth fade-in and fade-out effect.
Example Behavior:
- On hover, the first image fades out (opacity goes to 0%), and the second image fades in (opacity goes to 100%).
- When the hover is removed, the first image fades back in, and the second image fades out.
Holy snikees, Norm.
Whereâd ya get this guy?
There is no appearance panel, Hal.
Something like the following? Click on âSliding Tilesâ
The Appearance Panel is a section in the Right Sidebar Inspector of the Blocs 6 App. It lets you control visual styling properties of the selected element â without using custom code or the Class Manager.
Common Settings in the Appearance Panel include:
| Setting | Description |
|---|---|
| Opacity | Set how transparent an element is (0% = fully hidden, 100% = fully visible). |
| Visibility | Show or hide an element entirely on the page (e.g., hide on mobile). |
| Display | Toggle between block, inline, none, etc. |
| Positioning | Set layout behavior: static, absolute, fixed, etc. |
| Z-Index | Control stack order (which elements appear in front of others). |
| Overflow | How to handle content that exceeds the element boundaries. |
| Pointer Events | Enable or disable interaction with the element (e.g., ignore clicks). |
| Transition | Smoothly animate changes to properties like opacity or transform. |
You must have forgotten this Allen
@KBConcepts
4 years old, I havenât re-looked at the project though ![]()
Can that happen without the sliding action? I need one image to dissolve into a second image. Specifically, Iâll have a stylized AI composition sketch dissolve into the photo that it was derived from.
You would get a dissolve effect if picture 2 faded in
Agree, but I need a procedure that doesnât involve a non-existent âappearance panelâ.
@Samsdad see the thread I linked to above. I posted an example project of an image change on hover.
Since then you can now add transitions to the class in the class editor (finally!). No need for interactions itâs basic CSS.