ramiro1982/post-read-more

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

v1.0.2 2025-07-01 08:07 UTC

This package is auto-updated.

Last update: 2025-07-01 08:08:20 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.2

🧠 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.