logo-icon
STW UI

List

List is used to display content related to a single subject.

Usage

svelte
import { List } from 'stwui';
// OR
import List from 'stwui/list'; // for tree shaking

Default

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

No Dividers & Icon

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

With Extra

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

with Edge to Edge

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

Bordered

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

List No Avatar

  • Calvin Hawkins

    calvin.hawkins@example.com

  • Kristen Ramos

    kristen.ramos@example.com

  • Ted Fox

    ted.fox@example.com

List Just Title

  • Calvin Hawkins

  • Kristen Ramos

  • Ted Fox

List Just Description

  • calvin.hawkins@example.com

  • kristen.ramos@example.com

  • ted.fox@example.com

List Props

divided boolean true
bordered boolean false
edgeToEdge boolean false

List Slots

default <List.Item />

List.Item Slots

leading <List.Item.Leading slot="leading" />
content <List.Item.Content slot="content" />
default <List.Item.Extra slot="extra" />

List.Item.Leading Slots

icon <List.Item.Leading.Icon slot="icon" />
avatar <List.Item.Leading.Avatar slot="avatar" />
default

List.Item.Leading.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

List.Item.Leading.Avatar Props

src string
alt user-avatar
size 'xs' | 'sm' | 'md' | 'lg' | 'xl' md
placeholder boolean true

List.Item.Content Slots

default

List.Item.Content.Title Slots

default

List.Item.Content.Description Slots

default

List.Item.Extra Props

placement 'start' | 'center' | 'end' start

List.Item.Extra Slots

default

List Class Identifiers

stwui-list
stwui-list-item
stwui-list-item-leading
stwui-list-item-leading-avatar-wrapper
stwui-list-item-leading-avatar
stwui-list-item-leading-avatar-placeholder-wrapper
stwui-list-item-leading-avatar-placeholder
stwui-list-item-content
stwui-list-item-content-title
stwui-list-item-content-description
stwui-list-item-extra