ابنِ زر نسخ إلى الحافظة.
المكون
<div x-data="{ copied: false }">
<input type="text" wire:model="text" id="copyInput">
<button
@click="
navigator.clipboard.writeText($wire.text);
copied = true;
setTimeout(() => copied = false, 2000);
">
<span x-show="!copied">نسخ</span>
<span x-show="copied">تم النسخ!</span>
</button>
</div>