ramiro1982 / post-read-more
Blade + Alpine.js component to truncate post text with a 'Read more…' button
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Blade
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.