/
list-item.jade
553 lines (549 loc) · 18 KB
/
list-item.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
extends ../_internal-template
block vars
- var activeLink = 'vue';
- var title = 'List Item Vue Component | Framework7 Vue Documentation';
block content
.docs-wrap
.docs-nav
include ../_docs-vue-menu
.docs-content
h1 List Item Vue Component
h2 Usage examples
h4 Minimal Layout
pre
code
:code
<f7-list>
<f7-list-item title="Item 1"></f7-list-item>
<f7-list-item title="Item 2"></f7-list-item>
</f7-list>
p Renders to:
pre
code
:code
<div class="list-block">
<ul>
<li class="item-content">
<div class="item-inner">
<div class="item-title">Item 1</div>
</div>
</li>
<li class="item-content">
<div class="item-inner">
<div class="item-title">Item 2</div>
</div>
</li>
</ul>
</div>
h4 With Badges And Divider
pre
code
:code
<f7-list>
<f7-list-item title="Item 1" badge="5" badge-color="red"></f7-list-item>
<f7-list-item title="Item 2" badge="3" badge-color="red"></f7-list-item>
<f7-list-item title="Items Divider" divider></f7-list-item>
<f7-list-item title="Item 3"></f7-list-item>
...
</f7-list>
p Renders to:
pre
code
:code
<div class="list-block">
<ul>
<li class="item-content">
<div class="item-inner">
<div class="item-title">Item 1</div>
<div class="item-after">
<span class="badge bg-red">5</span>
</div>
</div>
</li>
<li class="item-content">
<div class="item-inner">
<div class="item-title">Item 2</div>
<div class="item-after">
<span class="badge bg-red">3</span>
</div>
</div>
</li>
<li class="item-divider"><span>Items Divider</span></li>
<li class="item-content">
<div class="item-inner">
<div class="item-title">Item 3</div>
</div>
</li>
</ul>
</div>
h4 Links Items
pre
code
:code
<f7-list>
<f7-list-item link="/about/" title="About"></f7-list-item>
<f7-list-item link="/contacts/" title="Contacts"></f7-list-item>
</f7-list>
p Renders to:
pre
code
:code
<div class="list-block">
<ul>
<li>
<a href="/about/" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">About</div>
</div>
</div>
</a>
</li>
<li>
<a href="/contacts/" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">Contacts</div>
</div>
</div>
</a>
</li>
</ul>
</div>
h4 Media List Items
pre
code
:code
<f7-list media-list>
<f7-list-item
link="/item/"
media="<img src='image.jpg'>"
title="Item Title"
subtitle="Item Subtitle"
text="Some text"
after="Read more"
></f7-list-item>
</f7-list>
p Renders to:
pre
code
:code
<div class="list-block media-list">
<ul>
<li>
<a href="/item/" class="item-link">
<div class="item-content">
<div class="item-media">
<img src='image.jpg'>
</div>
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">Item Title</div>
<div class="item-after">Read more</div>
</div>
<div class="item-subtitle">Item Subtitle</div>
<div class="item-text">Some text</div>
</div>
</div>
</a>
</li>
</ul>
</div>
h2 Slots
p List Item Vue component (<f7-list-item>) has additional slots for custom elements:
ul
li <b>root-start</b> - element will be inserted in the beginning of <li> element
li <b>root</b> - element will be inserted in the end of <li> element
li <b>content-start</b> - element will be inserted in the beginning of <div class="item-content"> element
li <b>content</b> - element will be inserted in the end of <div class="item-content"> element
li <b>media-start</b> - element will be inserted in the beginning of <div class="item-media"> element
li <b>media</b> - element will be inserted in the end of <div class="item-media"> element
li <b>inner-start</b> - element will be inserted in the beginning of <div class="item-inner"> element
li <b>inner/default</b> - element will be inserted in the end of <div class="item-inner"> element
pre
code
:code
<f7-list media-list>
<f7-list-item
link="/home/"
media="<img src='image.jpg'>"
title="Item Title"
subtitle="Item Subtitle"
text="Text"
after="Read more"
>
<div slot="root-start">Root Start</div>
<div slot="root">Root</div>
<div slot="content-start">Content Start</div>
<div slot="content">Content</div>
<div slot="media-start">Media Start</div>
<div slot="media">Media</div>
<span slot="after-start">After Start</span>
<span slot="after">After</span>
<div slot="inner-start">Inner Start</div>
<div slot="inner">Inner</div>
</f7-list-item>
</f7-list>
p Renders to:
pre
code
:code
<div class="list-block media-list">
<ul>
<li>
<div>Root Start</div>
<a href="/home/" class="item-link">
<div class="item-content">
<div>Content Start</div>
<div class="item-media">
<div>Media Start</div>
<img src="image.jpg">
<div>Media</div>
</div>
<div class="item-inner">
<div>Inner Start</div>
<div class="item-title-row">
<div class="item-title">Item Title</div>
<div class="item-after">
<span>After Start</span>
<span>Read more</span>
<span>After</span>
</div>
</div>
<div class="item-subtitle">Item Subtitle</div>
<div class="item-text">Text</div>
<div>Inner</div>
</div>
<div>Content</div>
</div>
</a>
<div>Root</div>
</li>
</ul>
</div>
h2 Properties
table.params-table
thead
tr
th Prop
th Type
th Default
th Description
tbody
tr
td title
td string
td
td List item title
tr
td subtitle
td string
td
td List item subtitle (only for Media List)
tr
td text
td string
td
td List item text (only for Media List)
tr
td media
td string
td
td List item media (icon, image, etc)
tr
td after
td string
td
td List item label
tr
td badge
td string/number
td
td List item Badge
tr
td badge-color
td string
td
td List item Badge color. One of <a href="../docs/color-themes.html">default colors</a>
tr
td media-item
td boolean
td
td Enables Media list item for the current list item
tr
td divider
td boolean
td
td Converts list item to list item divider
tr
td group-title
td boolean
td
td Converts list item to list group title
tr
td swipeout
td boolean
td
td Converts list item to <a href="swipeout-list.html">swipeout list item</a>
tr
td accordion-item
td boolean
td
td Converts list item to <a href="accordion-list.html">accordion list item</a>
tr
th(colspan="4") <a href="smart-select.html">Smart Select</a> properties
tr
td smart-select
td boolean
td
td Converts list item to smart select list item
tr
td smart-select-searchbar
td boolean
td
td Enables search bar for smart select page
tr
td smart-select-searchnar-placeholder
td string
td "Search"
td Smart select search bar search field placeholder text
tr
td smart-select-searchbar-cancel
td string
td "Cancel"
td Smart select search bar Cancel button text
tr
td smart-select-page-title
td string
td
td Smart select page title. Defaults to <code>title</code> prop
tr
td smart-select-back-text
td boolean
td "Back"
td Smart select page back-link text.
tr
td smart-select-back-on-select
td boolean
td
td Will close Smart Select page automatically after user selects any option
tr
td smart-select-open-in
td string
td "page"
td Defines how to open smart select: "page", "popup" or "picker"
tr
td smart-select-virtual-list
td boolean
td
td Enables Virtual list for smart select
tr
td smart-select-virtual-list-height
td number
td
td Allows to specify virtual list item height
tr
td smart-select-navbar-theme
td string
td
td Smart select navbar color theme. One of <a href="../docs/color-themes.html">default colors</a>
tr
td smart-select-form-theme
td string
td
td Smart select form color theme. One of <a href="../docs/color-themes.html">default colors</a>
tr
th(colspan="4") <a href="checkboxes-radios.html">Checkboxes & Radios</a> properties
tr
td checkbox
td boolean
td
td Enables checkbox-item
tr
td radio
td boolean
td
td Enables radio-item
tr
td checked
td boolean
td
td Whether the checkbox/radio input is checked
tr
td name
td string
td
td Checkbox/radio input name
tr
td value
td string/number
td
td Checkbox/radio input value
tr
td readonly
td boolean
td
td Whether the checkbox/radio input is readonly
tr
td disabled
td boolean
td
td Whether the checkbox/radio input is disabled
tr
td required
td boolean
td
td Whether the checkbox/radio input is required
tr
th(colspan="4") <a href="link.html">Link</a> properties
tr
td link
td boolean/string
td
td Enables link and link URL if specified as string
tr
td link-open-panel
td string/boolean
td
td Defines panel to open. Can be "left" or "right"
tr
td link-close-panel
td boolean
td
td Closes panel on click
tr
td link-open-popup
td string/boolean
td
td CSS selector of the popup to open on click
tr
td link-close-popup
td string/boolean
td
td CSS selector of the popup to close on click. Or boolean property to close currently opened popup
tr
td link-open-popover
td string/boolean
td
td CSS selector of the popover to open on click
tr
td link-close-popover
td string/boolean
td
td CSS selector of the popover to close on click. Or boolean property to close currently opened popover
tr
td link-open-picker
td string/boolean
td
td CSS selector of the picker to open on click
tr
td link-close-picker
td string/boolean
td
td CSS selector of the picker to close on click. Or boolean property to close currently opened picker
tr
td link-open-login-screen
td string/boolean
td
td CSS selector of the login screen to open on click
tr
td link-close-login-screen
td string/boolean
td
td CSS selector of the login screen to close on click. Or boolean property to close currently opened login screen
tr
td link-view
td string
td
td CSS selector of the View to load the page
tr
td link-no-fastclick
td boolean
td
td Disables fast click
tr
td link-external
td boolean
td
td Enable to bypass Framework7's link click handler
tr
td link-back
td boolean
td
td Enables back navigation link
tr
td link-force
td boolean
td
td Force page to load and ignore previous page in history (use together with <b>back</b> prop)
tr
td link-reload
td boolean
td
td Reloads new page instead of the currently active one
tr
td link-animate-pages
td boolean
td
td Disables pages animation
tr
td link-ignore-cache
td boolean
td
td Ignores caching
tr
td link-page-name
td string
td
td Name of the page to load
tr
td link-template
td string
td
td Template name to load
h2 Events
table.events-table
thead
tr
th Event
th Description
tbody
tr
td click
td Event will be triggeres when user clicks on list item
tr
td change
td Event will be triggeres when "change" event occurs on list item input (radio or checkbox)
tr
td swipeout
td Event will be triggered while you move swipeout element. <b>event.detail.progress</b> contains current opened progress percentage
tr
td swipeout:open
td Event will be triggered when swipeout element starts its opening animation
tr
td swipeout:opened
td Event will be triggered after swipeout element completes its opening animation
tr
td swipeout:close
td Event will be triggered when swipeout element starts its closing animation
tr
td swipeout:closed
td Event will be triggered after swipeout element completes its closing animation
tr
td swipeout:delete
td Event will be triggered after swipeout element starts its delete animation
tr
td swipeout:deleted
td Event will be triggered after swipeout element completes its delete animation right before it will be removed from DOM
tr
td accordion:open
td Event will be triggered when accordion content starts its opening animation.
tr
td accordion:opened
td Event will be triggered after accordion content completes its opening animation.
tr
td accordion:close
td Event will be triggered when accordion content starts its closing animation.
tr
td accordion:closed
td Event will be triggered after accordion content completes its closing animation.