Chip

Chips are complex entities in small blocks. Add a container element with the chip class. And add child text element, buttons or avatars with the avatar class.

Chip
Active
Avatar
Online
Busy
Albert Einstein
Closable

<script>
    import {Chip} from 'svelte-spectre'
</script>

<Chip>Chip</Chip>
<Chip active>Active</Chip>
<Chip name="CP">Avatar</Chip>
<Chip name="CP" status="online">Online</Chip>
<Chip name="CP" status="busy">Busy</Chip>
<Chip name="CP" status="busy" closable>
    <img slot="avatar" src="{base}/img/avatar-1.png" alt="Albert Einstein" />Closable
</Chip>
© 2022 — 2023 BASF SE

API Chip

<slot>: string
Chip content
any string
<slot name="avatar">: HTMLelement
<svg>, <img>
<svg> | <img>
avatar: boolean = false
Chip avatar
true | false
name: boolean = ""
Chip avatar name
any string
status: Status = null
Chip avatar status
null | online | away | busy | offline
active: boolean = false
Chip active state
true | false
closable: boolean = false
Chip closable
true | false