Chips / Tags - 图1

Chips

Chips (Tags) represent complex entities in small blocks, such as a contact. They can contain a photo, short title string, and brief information.

Chips Layout

Let’s look at basic chip HTML layout

  1. <div class="chip">
  2. <div class="chip-media">
  3. <img src="http://lorempixel.com/100/100/people/9/">
  4. </div>
  5. <div class="chip-label">Jane Doe</div>
  6. <a href="#" class="chip-delete"></a>
  7. </div>
  8. <div class="chip chip-outline">
  9. <div class="chip-label">Outline Chip</div>
  10. </div>

Where

  • <div class="chip"> - Chip container

    • <div class="chip-media"> - Chip “media” element, can contain image/avatar or icon. Optional

    • <div class="chip-label"> - Chip text label

    • <a class="chip-delete"> - Chip delete icon-link. Optional

    • chip-outline - additional class that can be added to chip element to make it outline

Examples

  1. <div class="block-title">Chips With Text</div>
  2. <div class="block block-strong">
  3. <div class="chip">
  4. <div class="chip-label">Example Chip</div>
  5. </div>
  6. <div class="chip">
  7. <div class="chip-label">Another Chip</div>
  8. </div>
  9. <div class="chip">
  10. <div class="chip-label">One More Chip</div>
  11. </div>
  12. <div class="chip">
  13. <div class="chip-label">Fourth Chip</div>
  14. </div>
  15. <div class="chip">
  16. <div class="chip-label">Last One</div>
  17. </div>
  18. </div>
  1. <div class="block-title">Outline Chips</div>
  2. <div class="block block-strong">
  3. <div class="chip chip-outline">
  4. <div class="chip-label">Example Chip</div>
  5. </div>
  6. <div class="chip chip-outline">
  7. <div class="chip-label">Another Chip</div>
  8. </div>
  9. <div class="chip chip-outline">
  10. <div class="chip-label">One More Chip</div>
  11. </div>
  12. <div class="chip chip-outline">
  13. <div class="chip-label">Fourth Chip</div>
  14. </div>
  15. <div class="chip chip-outline">
  16. <div class="chip-label">Last One</div>
  17. </div>
  18. </div>
  1. <div class="block-title">Icon Chips</div>
  2. <div class="block block-strong">
  3. <div class="chip">
  4. <div class="chip-media bg-color-blue">
  5. <i class="icon f7-icons ios-only">add_round</i>
  6. <i class="icon material-icons md-only">add_circle</i>
  7. </div>
  8. <div class="chip-label">Add Contact</div>
  9. </div>
  10. <div class="chip">
  11. <div class="chip-media bg-color-green">
  12. <i class="icon f7-icons ios-only">compass</i>
  13. <i class="icon material-icons md-only">location_on</i>
  14. </div>
  15. <div class="chip-label">London</div>
  16. </div>
  17. <div class="chip">
  18. <div class="chip-media bg-color-red">
  19. <i class="icon f7-icons ios-only">person</i>
  20. <i class="icon material-icons md-only">person</i>
  21. </div>
  22. <div class="chip-label">John Doe</div>
  23. </div>
  24. </div>
  1. <div class="block-title">Contact Chips</div>
  2. <div class="block block-strong">
  3. <div class="chip">
  4. <div class="chip-media"><img src="http://lorempixel.com/64/64/people/9/"/></div>
  5. <div class="chip-label">Jane Doe</div>
  6. </div>
  7. <div class="chip">
  8. <div class="chip-media"><img src="http://lorempixel.com/64/64/people/9/"/></div>
  9. <div class="chip-label">John Doe</div>
  10. </div>
  11. <div class="chip">
  12. <div class="chip-media"><img src="http://lorempixel.com/64/64/people/9/"/></div>
  13. <div class="chip-label">Adam Smith</div>
  14. </div>
  15. <div class="chip">
  16. <div class="chip-media bg-color-pink">J</div>
  17. <div class="chip-label">Jennifer</div>
  18. </div>
  19. <div class="chip">
  20. <div class="chip-media bg-color-yellow text-color-black">C</div>
  21. <div class="chip-label">Chris</div>
  22. </div>
  23. <div class="chip">
  24. <div class="chip-media bg-color-red">K</div>
  25. <div class="chip-label">Kate</div>
  26. </div>
  27. </div>
  1. <div class="block-title">Deletable Chips / Tags</div>
  2. <div class="block block-strong">
  3. <div class="chip">
  4. <div class="chip-label">Example Chip</div><a href="#" class="chip-delete"></a>
  5. </div>
  6. <div class="chip">
  7. <div class="chip-media bg-color-orange text-color-black">C</div>
  8. <div class="chip-label">Chris</div><a href="#" class="chip-delete"></a>
  9. </div>
  10. <div class="chip">
  11. <div class="chip-media"><img src="http://lorempixel.com/64/64/people/9/"/></div>
  12. <div class="chip-label">Jane Doe</div><a href="#" class="chip-delete"></a>
  13. </div>
  14. <div class="chip">
  15. <div class="chip-label">One More Chip</div><a href="#" class="chip-delete"></a>
  16. </div>
  17. <div class="chip">
  18. <div class="chip-media bg-color-pink">J</div>
  19. <div class="chip-label">Jennifer</div><a href="#" class="chip-delete"></a>
  20. </div>
  21. <div class="chip">
  22. <div class="chip-media"><img src="http://lorempixel.com/64/64/people/9/"/></div>
  23. <div class="chip-label">Adam Smith</div><a href="#" class="chip-delete"></a>
  24. </div>
  25. </div>
  1. <div class="block-title">Color Chips</div>
  2. <div class="block block-strong">
  3. <div class="chip color-red">
  4. <div class="chip-label">Red Chip</div>
  5. </div>
  6. <div class="chip color-green">
  7. <div class="chip-label">Green Chip</div>
  8. </div>
  9. <div class="chip color-blue">
  10. <div class="chip-label">Blue Chip</div>
  11. </div>
  12. <div class="chip color-orange">
  13. <div class="chip-label">Orange Chip</div>
  14. </div>
  15. <div class="chip color-pink">
  16. <div class="chip-label">Pink Chip</div>
  17. </div>
  18. <div class="chip chip-outline color-red">
  19. <div class="chip-label">Red Chip</div>
  20. </div>
  21. <div class="chip chip-outline color-green">
  22. <div class="chip-label">Green Chip</div>
  23. </div>
  24. <div class="chip chip-outline color-blue">
  25. <div class="chip-label">Blue Chip</div>
  26. </div>
  27. <div class="chip chip-outline color-orange">
  28. <div class="chip-label">Orange Chip</div>
  29. </div>
  30. <div class="chip chip-outline color-pink">
  31. <div class="chip-label">Pink Chip</div>
  32. </div>
  33. </div>