Skip to content

ListTile

A single fixed-height row that typically contains some text as well as a leading or trailing icon.

Usage

One-line list tile
Two-line list tileHere is a subtitle
Three-line list tileA sufficiently long subtitle that warrants three lines.
vue
<template>
  <Column>
    <ListTile title="One-line list tile" @tap="() => console.log('tap')" />
    <Divider />
    <ListTile title="Two-line list tile" subtitle="Here is a subtitle" :leading="IconPlaceholder" />
    <Divider />
    <ListTile
      title="Three-line list tile"
      subtitle="A sufficiently long subtitle that warrants three lines."
      :leading="IconPlaceholder"
      :trailing="IconPlaceholder"
      :selected="true"
    />
  </Column>
</template>

<script setup lang="ts">
import { Column, ListTile, Divider, Container } from "fluekit";
import { h } from "vue";

const IconPlaceholder = h(Container, { width: 24, height: 24, color: "#ccc" });
</script>

API

Props

NameTypeDefaultDescription
leadingany-A widget to display before the title.
titlestring-The primary content of the list tile.
subtitlestring-Additional content displayed below the title.
trailingany-A widget to display after the title.
enabledbooleantrueWhether this list tile is interactive.
selectedbooleanfalseIf this tile is also enabled then icons and text are rendered with the same color.
tileColorstring-Defines the background color of ListTile when selected is false.
selectedColorstring'rgba(33, 150, 243, 0.12)'The color to use for the tile's background when the tile is selected.
iconColorstring-The default color for the leading and trailing icons.
textColorstring-The color for the title and subtitle.
contentPaddingEdgeInsets-The internal padding for the tile's content.
densebooleanfalseWhether this list tile is part of a vertically dense list.

Events

NameDescription
tapTriggered when the tile is tapped.
long-pressTriggered when the tile is long-pressed.

Slots

NameDescription
leadingSlot for leading widget.
titleSlot for title widget.
subtitleSlot for subtitle widget.
trailingSlot for trailing widget.