Epicenter
Local-first, open source apps
Processing payment...
$100.00
Installation
Install @lucide/svelte:
Copy and paste the following code into your project.
Usage
<script lang="ts">
import { Spinner } from "$lib/components/ui/spinner/index.js";
</script> <Spinner /> Customization
You can replace the default spinner icon with any other icon by editing the Spinner component.
<script lang="ts">
import LoaderIcon from "@lucide/svelte/icons/loader";
import { cn } from "$lib/utils.js";
import type { SVGAttributes } from "svelte/elements";
let { class: className, ...restProps }: SVGAttributes<SVGSVGElement> =
$props();
</script>
<LoaderIcon
role="status"
aria-label="Loading"
class={cn("size-4 animate-spin", className)}
{...restProps}
/> Size
Use the size-* utility class to change the size of the spinner.
Button
Add a spinner to a button to indicate a loading state. Place the <Spinner /> before the label with data-icon="inline-start" for a start position, or after the label with data-icon="inline-end" for an end position.
Badge
Add a spinner to a badge to indicate a loading state. Place the <Spinner /> before the label with data-icon="inline-start" for a start position, or after the label with data-icon="inline-end" for an end position.
Syncing Updating Processing
Input Group
Validating...
Empty
Processing your request
Please wait while we process your request. Do not refresh the page.