flowbite-svelte
flowbite-svelte copied to clipboard
Button alignment in Modals - how can I override footer item alignment?
Summary
In Modal dialogues, the footer can contain buttons. But unlike most systems, Flowbite-svelte left-aligns everything in the footer slot. How can I pull this to the right, where most other UI frameworks put them?
Basic example
Current:
Desired:
Motivation
Most UI frameworks align modal dialog buttons to the right hand side. It's very jarring for flowbite to do it differently.
you can just wrap your buttons in a element and align them
<svelte:fragment slot="footer">
<div class="flex justify-end w-full gap-x-4">
<Button on:click={() => alert('Handle "success"')}>I accept</Button>
<Button color="alternative">Decline</Button>
</div>
</svelte:fragment>