> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/volume-themes/theme-sections/text/collapse-long-text.md). Agents can also search and read this documentation through its [MCP server](https://staylime.com/docs/~gitbook/mcp).

# Collapse long text

Shorten a text block to a few lines, with View more and View less, and where that checkbox lives.

Collapse long text shortens a block of text to a few lines and adds a button to open the rest.

{% hint style="info" %}
The checkbox is **Collapse long text**. The settings under it appear only while it is on.
{% endhint %}

{% stepper %}
{% step %}

#### Turn it on

* **Collapse long text**\
  Off out of the box.
  {% endstep %}

{% step %}

#### Choose how many lines stay visible

* **Visible lines on desktop**\
  2 to 20. The default is 4.
* **Visible lines on mobile**\
  2 to 20. The default is 3.
  {% endstep %}

{% step %}

#### Name the buttons

* **Expand button label**\
  Empty out of the box, which shows **View more**.
* **Show collapse button**\
  On out of the box. Turn it off and the shopper can open the text, with no button to fold it back.
* **Collapse button label**\
  Visible while **Show collapse button** is on. Empty out of the box, which shows **View less**.
  {% endstep %}
  {% endstepper %}

### Good to know

The button stays hidden when the text already fits in the chosen number of lines.

This is not **Collapsible description**, **Pop-up description**, or **Collapsible tab**. Those are separate blocks.

The same checkbox, with the same defaults, is on:

* the **Description** block and the **Text** block in **Product overview**, **Featured product**, and **Quick view**
* the **Testimonial** block
* **Collection banner** and **Collection banner vertical**, visible only while **Show collection description** is on
* **Text** blocks in other sections, including the text inside **News drawer** blocks

### Related

* [Product Page](https://staylime.com/docs/volume-themes/collections-and-products/product-page.md)
* [Quick View & Pre-order templates](https://staylime.com/docs/volume-themes/collections-and-products/product-page/quick-view-and-pre-order-templates.md)
* [Testimonials](https://staylime.com/docs/volume-themes/theme-sections/trust-and-social-proof/testimonials.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://staylime.com/docs/volume-themes/theme-sections/text/collapse-long-text.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
