How to Truncate Long Product Description
Last updated: June 26, 2024
It's a common setup for some products to "truncate" long product descriptions with a "see more" interaction. Here's how you can do that in Replo:
Setting Up the 'Read More' Button:
Begin by adding a container right below the product description.
Add a text element with the label "Read More".
Add a chevron down icon next to the text to indicate expandability.
Name the container for easy identification e.g Read
Creating Default and Expanded States for Product Description:
Setting Up the 'Read Less' Button:
Create a custom state for this container(Read) named "Read less".
In the "Read less" state, change the text in the container from "Read more" to "Read Less" and the icon to a chevron up.
Activating States with Interactions:
For the default state of the "Read More" button:
Add an interaction to activate the "expand" state of the product description upon click.
Add another interaction to change the Read container to the "Read less" state upon click.
For the "Read less" state of the button:
Add an interaction to revert the product description to its default state upon click.
Add another interaction to change the button back to its default state upon click.