1. Reference
  2. Structure

<list-tile>

A Material list row with an icon, a title, a subtitle and an optional switch, checkbox or radio.

Structure
list-tile.ham
<column style="w-full">
    <list-tile icon="person"
               label="Account"
               subtitle="maya@example.com"
               trailing="chevron_right"/>
    <list-tile icon="notifications"
               label="Notifications"
               color="teal"
               type="switch"
               name="notify"
               checked="true"/>
    <list-tile icon="dark_mode"
               label="Dark mode"
               type="checkbox"
               name="dark"/>
</column>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
checked Initial checked state (switch/checkbox)
boolean
false
color Icon and toggle color
color
icon
also leading-icon, leading_icon
Leading icon
string
label Title text
string
name Variable name for form scoping
string
selected Initial selected state (radio)
boolean
false
subtitle Subtitle text
string
trailing Trailing icon
string
type Tile variant
plain, switch, checkbox, radio
plain
value Radio/checkbox value
string

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

Guides and recipes that use it

This page is also Markdown, and all of HAM is in llms.txt.