v3.5.0 is out! Dozens of significant improvements overall! Keep your TallStackUI up to date to get the best experience.

Powerful suite of Blade components for TALL Stack apps.

Clipboard

Clipboard component.

<x-clipboard text="TallStackUI" />
 
<!-- Or -->
 
<x-clipboard>
TallStackUI
</x-clipboard>
<x-clipboard text="TallStackUI" left />
Copy the name of the library
<x-clipboard label="Library" hint="Click to copy the library name" text="TallStackUI" />

An option to transform the input in a password type.

Copy the name of the library
<x-clipboard text="TallStackUI" secret />
<x-clipboard x-on:copy="alert(`Copied: ${$event.detail.text}`)">
TallStackUi
</x-clipboard>
<x-clipboard text="TallStackUI" icon />
 
<!-- Or -->
 
<x-clipboard icon>
TallStackUI
</x-clipboard>
The icon style does not support label and hint.
<x-clipboard text="TallStackUI"
icon
:icons="['copy' => 'pencil', 'copied' => 'check']"/>

An option to copy text using a JavaScript API.

<x-button x-on:click="$tsui.copy('TallStackUI')">
Copy
</x-button>
// $tsui.copy resolves to a boolean reporting whether the copy succeeded.
const copied = await window.$tsui.copy('TallStackUI');
 
// It also dispatches the `ts-ui:copy` event on window with the copied text.
window.addEventListener('ts-ui:copy', (event) => {
alert(`Copied: ${event.detail.text}`); // 'Copied: TallStackUI'
});

Code highlighting provided by Torchlight