Framework7 => Chips/Tags – ADD UPDATE

User Management System
Learn Kotlin, Retrofit, MVVM and MySQL using this all-in-one app. It is designed to be beginner friendly.

Chips are a very popular way of showing tags in websites or contacts in mobile devices.Chips are sometimes called tags. Framework7 provides easy to use and customizable tags/chips that we can use in our app. Chips can contain text, media/images, and button. The button can be used to delete the chip.

So today we see how to make a chip with text, media and delete button. The delete button can be used to dismiss the chip. We will generate chips at runtime from an input element when the user presses enter.

Questions this Project answers.

  • Framework7 dismissable chips.
  • Framework7 deletable tags.
  • Getting started with framework7.
  • Framework7 chips/tags tutorial.

Libraries Used

These are the third parties used in this project.

  • Here's the screenshot of the project.

  • Project Structure

Tools used

Language: Javascript,HTML,CSS

Framework: Framework7

IDE: PHPStorm.

Topic: Framework7 dismissable chips,Framework7 tags.

Source Code

Lets have a look at the source code.


  • Our index.html file.
  • We reference framework7 material css in the header.
  • We also reference our javascript scripts at the base of the body.
<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">


    <!-- REFERENCE CSS-->
    <link rel="stylesheet" href="assets/css/framework7.material.min.css">
    <link rel="stylesheet" href="assets/css/framework7.material.colors.min.css">
    <link rel="stylesheet" href="assets/css/my-app.css">


    <!-- VIEWS-->
    <div class="views">

      <!-- Your main view, should have "view-main" class-->
      <div class="view view-main">

        <!-- Top Navbar-->
        <div class="navbar">
          <div class="navbar-inner">

            <!-- We have home navbar without left link-->
            <div class="center sliding"></div>
            <div class="right">
              <!-- Right link contains only icon - additional "icon-only" class--><a href="#" class="link icon-only"> <i class="icon icon-bars"></i></a>

        <!-- Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes-->
        <div class="pages navbar-through toolbar-through">

          <!-- Page, data-page contains page name-->
          <div data-page="index" class="page">

            <!-- Scrollable page content-->
            <div class="page-content">
              <div class="content-block-title">Deletable Chips / Tags</div>
              <div class="content-block">
                <div class="item-input">
                  <input type="text" id="galaxyTxt" class="input-field" placeholder="Enter Galaxy Names" onkeydown="getInputValue(event)">

                <div id="displaySectionID">


        <!-- Bottom Toolbar-->
        <div class="toolbar">
          <div class="toolbar-inner"><a href="#" class="link">Home</a><a href="#" class="link">About Us</a></div>

    <script type="text/javascript" src="assets/js/framework7.min.js"></script>
    <script type="text/javascript" src="assets/js/main.js"></script>


  • Main class.
  • Initialize Framework 7.
  • Create chip from input text when user presses enter
var mainClass=function()
     -Initialize your app
    var myApp = new Framework7();

    - Create and return chip
        var chip=document.createElement('div');

        //chip media
        var chipLabel=document.createElement('div');

        //chip media
        var chipMedia=document.createElement('div');
        chipMedia.className='chip-media bg-teal';

        //delete btn
        var deleteBtn=document.createElement('a');

        //append chip sections

        deleteBtn.onclick=function (e) {
            myApp.confirm('Do you want to delete '+galaxyName, function () {

        return chip;
- Get input value when users presses enter
function getInputValue(e)
    m=new mainClass();

    //when user clicks enter
    if (e.keyCode == 13) {
            var galaxy = document.getElementById("galaxyTxt").value;
            return false;

Video Tutorial

Below is the video version of this tutorial.


  • Download the Project below.


How to Download and Run.

  1. Download the project above.
  2. You'll get a zipped file,extract it.
  3. You'll have three files : html,css and javascript.
  4. Place them in a folder and run the index.html file.That's it.


  • Visit our channel for more examples like these.
  • Lets share tips and ideas in our Facebook Page.


Android MySQL Retrofit2 Multipart CRUD,Search,Pagination rating

When I was a 2nd year Software Engineering student, I buillt a now defunct online tool called Camposha(from Campus Share) using my then favorite language C#(ASP.NET) to compete OLX in my country(Kenya). The idea was to target campus students in Kenya. I got a few hundred signups but competing OLX proved too daunting. I decided to focus on my studies, learning other languages like Java,Python,Kotlin etc while meanwhile publishing tutorials at my YouTube Channel ProgrammingWizards TV which led to this site( Say hello or post me a suggestion: . Follow me below; Github , and on my channel: ProgrammingWizards TV

We will be happy to hear your thoughts

Leave a reply

twenty nine + = thirty eight

Reset Password
Compare items
  • Total (0)
Shopping cart