Fluxify a button to copy text (url) #595
-
I have a working button "copy link", that, when clicked, copies a url to the clipboard and, for 4 seconds, shows a "copied!" message inside this same button with corresponding icon.
Maybe its more related to alpineJS(?) But i cant seem to figure it out trying this to switch to Flux. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@GuidoVeltmaat How about using a readonly input with the |
Beta Was this translation helpful? Give feedback.
I understand what you are saying, @GuidoVeltmaat - in this case, I tend to opt towards the simplest approach.
You could choose to make the input
disabled
(instead ofreadonly
) to at least make sure it is not included in the POST values returned when the form is submitted.If you want to stick with the GitHub style paste button, why not make your own custom component using the Alpine code from above?