Lists
Customizable scrollable lists.
- Bryan Cranston
- Aaron Paul
- Bob Odenkirk
Simple list
html mdlList
style: 'width: 300px';
with: [
#('Bryan Cranston' 'Aaron Paul' 'Bob Odenkirk') do: [ :name | html mdlListItem: [ html mdlListPrimaryContent: name ] ] ]- personBryan Cranston
- personAaron Paul
- personBob Odenkirk
Icons
html mdlList
style: 'width: 300px';
with: [ #('Bryan Cranston' 'Aaron Paul' 'Bob Odenkirk')
do: [ :name |
html
mdlListItem: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemIcon;
with: #person.
html text: name ] ] ] ] html mdlList
style: 'width: 300px';
with: [ #('Bryan Cranston' 'Aaron Paul' 'Bob Odenkirk')
do: [ :name |
html
mdlListItem: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: name ].
html mdlListItemSecondaryAction
url: '#';
with: [ html mdlIcon: #star ] ] ] ] html mdlList
style: 'width: 300px';
with: [ html
mdlListItem: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Bryan Cranston' ].
html mdlListItemSecondaryAction
with: [ html mdlCheckboxContainer
for: html nextId;
with: [ html mdlCheckbox
id: html lastId;
value: true ] ] ].
html
mdlListItem: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Aaron Paul' ].
html mdlListItemSecondaryAction
with: [ html mdlRadioContainer
style: 'display: inline;';
for: html nextId;
rippleEffect;
with: [ html mdlRadioButton
id: html lastId;
value: '1';
name: 'options' ] ] ].
html
mdlListItem: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Bob Odenkirk' ].
html mdlListItemSecondaryAction
with: [ html mdlSwitchContainer
for: html nextId;
with: [ html mdlSwitch
id: html lastId;
value: '1'.
html mdlSwitchLabel ] ] ] ]Two line
html mdlList
style: 'width: 300px';
with: [ html mdlListItem
twoLine;
with: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Bryan Cranston'.
html mdlListItemSubTitle: 'Appears in 62 Episodes' ].
html
mdlListSecondaryContent: [ html mdlListItemSecondaryInfo: 'Actor'.
html mdlListItemSecondaryAction
url: '#';
with: [ html mdlIcon: #star ] ] ].
html mdlListItem
twoLine;
with: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Aaron Paul'.
html mdlListItemSubTitle: 'Appears in 62 Episodes' ].
html
mdlListSecondaryContent: [ html mdlListItemSecondaryAction
url: '#';
with: [ html mdlIcon: #star ] ] ].
html mdlListItem
twoLine;
with: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: 'Bob Odenkirk'.
html mdlListItemSubTitle: 'Appears in 62 Episodes' ].
html
mdlListSecondaryContent: [ html mdlListItemSecondaryAction
url: '#';
with: [ html mdlIcon: #star ] ] ] ]- personBryan CranstonBryan Cranston played the role of Walter in Breaking Bad. He is also known for playing Hal in Malcom in the Middle.star
- personAaron PaulAaron Paul played the role of Jesse in Breaking Bad. He also featured in the "Need For Speed" Movie.star
- personBob OdenkirkBob Odinkrik played the role of Saul in Breaking Bad. Due to public fondness for the character, Bob stars in his own show now, called "Better Call Saul".star
Three line
| actors |
actors := OrderedDictionary
with: 'Bryan Cranston' -> 'Bryan Cranston played the role of Walter in Breaking Bad. He is also known for playing Hal in Malcom in the Middle.'
with: 'Aaron Paul' -> 'Aaron Paul played the role of Jesse in Breaking Bad. He also featured in the "Need For Speed" Movie.'
with: 'Bob Odenkirk' -> 'Bob Odinkrik played the role of Saul in Breaking Bad. Due to public fondness for the character, Bob stars in his own show now, called "Better Call Saul".'.
html mdlList
style: 'width: 650px';
with: [ actors
keysAndValuesDo: [ :actor :descr |
html mdlListItem
threeLine;
with: [ html
mdlListPrimaryContent: [ html mdlIcon
listItemAvatar;
with: #person.
html text: actor.
html mdlListItemTextBody: descr ].
html
mdlListSecondaryContent: [ html mdlListItemSecondaryAction
url: '#';
with: [ html mdlIcon: #star ] ] ] ] ]