ramiro1982/post-read-more

Blade + Alpine.js component to truncate post text with a 'Read more…' button

Maintainers

Package info

github.com/RAMIRO1982/post-read-more

Language:Blade

pkg:composer/ramiro1982/post-read-more

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.4 2025-07-11 13:27 UTC

This package is auto-updated.

Last update: 2026-03-11 15:00:33 UTC


README

A reusable Blade + Alpine.js component to truncate post descriptions with a Read more… button when the text overflows. Useful for blogs, feeds, or article previews.

📦 Installation

Install the package via Composer:

composer require ramiro1982/post-read-more:^1.0.4

🧠 Requirements

This component uses the line-clamp utility from Tailwind CSS, so make sure it is available in your project.

🚀 Usage

You can pass any text and additional Tailwind classes:

    <x-post-read-more :text="$post->description" class="text-base text-gray-700" />

The text will be truncated to 3 lines, and if it overflows, a "Read more…" button will appear to expand the full content.

🙌 Created by

Made with 💻 and ☕ by Ramiro Rimoldi

🤝 Contributing

Pull requests and suggestions are welcome! If you find a bug or want to add a feature, feel free to open an issue or PR.

📄 License

This package is open-sourced software licensed under the MIT license.