Component

Button

Click it and make actions happen.

/// DEMO ///

///

1
<script lang="ts">
2
    import Button from '$lib/components/base/button.svelte';
3
</script>
4

5
<Button>Default</Button>
6
<Button variant="inverted">Inverted</Button>
7
<Button variant="primary">Primary</Button>
8
<Button variant="secondary">Secondary</Button>
9
<Button variant="destructive">Destructive</Button>
10
<Button variant="outline">Outline</Button>
11
<Button variant="ghost">Ghost</Button>
12
<Button disabled>Disabled</Button>
13
<Button loading>Loading</Button>
14
<Button edge="circle">Circle</Button>
15
<Button edge="sharp">Sharp</Button>
16
<Button>
17
    {@render IconLomerUI()}
18
    With Icon
19
</Button>
20
<Button size="icon">
21
    {@render IconLomerUI()}
22
</Button>
23
<Button size="fit">
24
    <img class="size-7 rounded" src="https://avatars.githubusercontent.com/u/16535340?v=4&quot" alt="avatar" />
25
</Button>
26
<Button size="small">Small</Button>
27

28
{#snippet IconLomerUI()}
29
    <svg xmlns="http://www.w3.org/2000/svg" class="max-w-6 min-w-6" viewBox="0 0 208 208">
30
        <path
31
            fill-rule="evenodd"
32
            clip-rule="evenodd"
33
            d="M104 0L0 104L104 208L208 104L104 0ZM82 126H52L30 104L104 30L178 104L156 126H126L148 104L104 60L60 104L82 126Z"
34
            fill="currentColor"
35
        />
36
    </svg>
37
{/snippet}
38

Guide

We only need one component.

Share treats:

Copyright © 2025 - Cliemtor Fabros