Collapsible
Read More
A long-text disclosure: the clamp counts lines rather than pixels, a gradient replaces the hard cut, and a Show more button expands it.
What you can change
- the heading through the title prop
- the copy through the text prop
- the number of visible lines through the lines prop
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/collapsible-003?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
The component is self-contained: one file, no dependencies, its own palette in local variables --vibeui-collapsible-003-*. It is a client component: "use client" for useState. The clamp is made by the pairing of display:-webkit-box, -webkit-box-orient:vertical and -webkit-line-clamp, where the number of lines arrives through the --vibeui-collapsible-003-lines variable from the lines prop — that is why the boundary always lands on a line baseline. The gradient lives in the ::after of the clamp container and ends in the same background variable as the whole card. The button is linked to the paragraph through aria-controls and carries aria-expanded.
Tags
- collapsible
- read-more
- line-clamp
- text
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…