PHPackages                             princeminky/promptable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. princeminky/promptable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

princeminky/promptable
======================

Promptable. One line of code is all you need.

v1.0.1(4mo ago)02MITPHPPHP &gt;=8.3

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/PrinceMinky/Promptable)[ Packagist](https://packagist.org/packages/princeminky/promptable)[ RSS](/packages/princeminky-promptable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Promptable
==========

[](#promptable)

One line of code is all you need to add safe, user-friendly confirmation prompts to your Livewire actions — with beautiful Flux UI modals.

`princeminky/promptable` provides a small `Promptable` trait you drop into any Livewire v3 component. Call `$this->prompt(...)` inside an action to halt execution, show a confirmation modal, and then automatically resume the original action after the user confirms.

---

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Laravel 12
- Livewire 3
- Flux UI (free or Pro) v2 — for the modal and buttons used by the included view
- Tailwind CSS v4

These match the constraints declared in `composer.json`.

---

Installation
------------

[](#installation)

### 1) Install the package

[](#1-install-the-package)

```
composer require princeminky/promptable
```

If using this package locally via a path repository (monorepo / workbench):

1. In your application `composer.json`, add a path repository (adjust the path to your environment):

```
{
  "repositories": [
    { "type": "path", "url": "packages/princeminky/promptable" }
  ]
}
```

2. Require the package:

```
composer require princeminky/promptable:* --dev
```

Auto-discovery will register the service provider and alias.

### 2) Include the modal in your Livewire view

[](#2-include-the-modal-in-your-livewire-view)

Use the Blade component inside a Livewire component view so `$this` refers to the Livewire instance:

```
{{-- resources/views/livewire/delete-post.blade.php --}}
@promptable
```

Do not place this in a non-Livewire layout. It must be inside a Livewire component view.

### 3) (Optional) Publish the view for customization

[](#3-optional-publish-the-view-for-customization)

```
php artisan vendor:publish --tag=promptable-views --no-interaction
```

This will copy:

```
resources/views/vendor/promptable/prompt.blade.php

```

Edit the published view to fully customize the modal.

---

Quick Start
-----------

[](#quick-start)

1. Use the trait in a Livewire component.
2. Call `$this->prompt(...)` inside any action. Execution halts, the modal opens, and when the user confirms, the original action resumes from the next line.

```
