List Button Svelte Component

List Button is intended to be used inside of the List Svelte Component.

Contents

List Button Components

There are following components included:

  • ListButton

ListButton Props

NameTypeDefaultDescription
colorsobject

Object with Tailwind CSS colors classes

colors.bgIosstring'active:bg-primary/15'
colors.bgMaterialstring''
colors.textIosstring'text-primary'
colors.textMaterialstring'text-md-light-primary dark:text-md-dark-primary'
colors.touchRipplestring'touch-ripple-primary'
linkComponentstring'a'

Button HTML Element

linkPropsany

Object with additional props (attributes) to pass to the Link/Button

targetstring

Button's link

typestringundefined

Button's

valueany

Button's

onClickfunction(e)

Examples

ListButton.svelte
<script>
import {
Page,
Navbar,
NavbarBackLink,
List,
ListButton,
} from 'konsta/svelte';
</script>
<Page>
<Navbar title="List Button">
{#snippet left()}
{#if !isPreview}
<NavbarBackLink onclick={() => history.back()} />
{/if}
{/snippet}
</Navbar>
<List strong>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List strong inset>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List strong inset>
<ListButton class="k-color-brand-red">Red Button</ListButton>
</List>
</Page>
Code licensed under MIT.
2025 © Konsta UI by nolimits4web.