tall icon indicating copy to clipboard operation
tall copied to clipboard

Add a spinner while loading

Open Wulfheart opened this issue 5 years ago • 3 comments

A visual clue would be helpful while livewire is doing something in the background.

I recommend the tailwind spinner plugin for this purpose. I'd be willed to create a PR if any of the maintainers (I assume @imliam and @DanHarrin) approve the usage of an additional tailwind plugin.

Wulfheart avatar May 08 '20 16:05 Wulfheart

Hey, I'd rather reduce the number of unofficial dependencies really? I reckon we could get away with a loading class on the buttons -

wire:loading.class="opacity-75 cursor-wait"

This works a treat normally.

danharrin avatar May 08 '20 16:05 danharrin

@DanHarrin Ok. Will make it. 😎

Wulfheart avatar May 08 '20 16:05 Wulfheart

Since Tailwind now supports animations, this could be implemented without adding a dependency: https://tailwindcss.com/docs/animation#spin.

stefanfisk avatar Oct 31 '20 09:10 stefanfisk