×

Ionic Chip

Ionic chip displays the complex entities in small entities in small blocks, such as the contacts. Ionic chip has several types of elements like avatars, thumbnails, text, and icons. It is a bubble-like container that holds the text and icons.

Example: This example explains how you can use the ionic chip in the ionic application.

Home.page.html

<ion-header>  
 <ion-toolbar color="primary">  
     <ion-title>Ionic Chip Example</ion-title>  
   </ion-toolbar>  
 </ion-header>  
 <ion-content class="ion-padding" color="light">   
   <h1>Ionic Chip</h1>  
   <ion-chip>  
     <ion-label>Default Chip</ion-label>  
   </ion-chip>  
 </ion-content>   

Output: After executing this code, you will get the output, shown below:

Ionic Chip

Adding Avatar and Icons

The Ionic application permits you to add the avatar and icons in the chip component. To add the icons and avatar in the <ion-chip> component, you are required to insert <ion-icon> and <ion-avatar> component inside the <ion-chip> component.

Example: This example explains how you can add the icons and avatars in the ionic chip component. 

Home.page.html

<ion-header>  
   <ion-toolbar color="primary">  
     <ion-title>Ionic Chip</ion-title>  
   </ion-toolbar>  
 </ion-header>  
 <ion-content class="ion-padding" color="light">   
   <h1>Avatars and Icons</h1>  
   <ion-chip>  
     <ion-icon name="settings"></ion-icon>  
     <ion-label>Default Chip</ion-label>
     <ion-icon name="close-circle"></ion-icon>   
   </ion-chip>  
   <ion-chip>  
     <ion-icon name="share" color="primary"></ion-icon>  
     <ion-label>Icon Chip</ion-label>  
     <ion-icon name="close-circle"></ion-icon>   
   </ion-chip> 
   <ion-chip>  
     <ion-icon name="add" color="danger"></ion-icon>
     <ion-label>Button Chip</ion-label>  
     <ion-icon name="close"></ion-icon>  
   </ion-chip>   
   <ion-chip>  
     <ion-avatar>  
       <img src="assets\icon\avatar.png">  
     </ion-avatar>  
     <ion-label>Avatar Chip</ion-label>  
     <ion-icon name="close"></ion-icon>  
   </ion-chip>  
 </ion-content>   

Output: After executing this code, you will get the output, as shown below:

Ionic Chip2

Outline Chip

By default, the shape of the ionic is solid. However, it can be changed using the outline property. You can set the outline chip by using the <ion-chip> component.

Example: This example explains how you can use the outline chip in the ionic application.

Home.page.html

<ion-header>  
 <ion-toolbar color="primary">  
     <ion-title>Ionic Chip Example</ion-title>  
   </ion-toolbar>  
 </ion-header>   
 <ion-content class="ion-padding" color="light">  
   <h1>Ionic Chip</h1>  
   <ion-chip>   
     <ion-label>Default Chip</ion-label>  
   </ion-chip>
   <ion-chip outline>Outline Chip</ion-chip>
 </ion-content>   

Output: After executing this code, you will get the output, as shown below:

Ionic Chip3

Chip Styling

It is used to colorize the chip component in the different styles. By using the color attribute, you can change the styling of the ionic chip.

Example: This example explains how you can use the color attribute inside the chip component.

Home.page.html

<ion-header>  
   <ion-toolbar color="primary">  
     <ion-title>Ionic Chip Example</ion-title>  
   </ion-toolbar>  
 </ion-header>   
 <ion-content class="ion-padding" color="light">  
   <h1>Avatars and Icons</h1>  
   <ion-chip color="danger">  
     <ion-icon name="settings"></ion-icon>  
     <ion-label>Default Chip</ion-label>
     <ion-icon name="close-circle"></ion-icon>   
   </ion-chip>  
   <ion-chip color="warning">  
     <ion-icon name="share" color="primary"></ion-icon>  
     <ion-label>Icon Chip</ion-label>  
     <ion-icon name="close-circle"></ion-icon>  
   </ion-chip> 
   <ion-chip color="primary">
     <ion-icon name="add" color="danger"></ion-icon>
     <ion-label>Button Chip</ion-label>   
     <ion-icon name="close"></ion-icon>  
   </ion-chip>  
   <ion-chip color="success">  
     <ion-avatar>   
       <img src="assets\icon\avatar.png">  
     </ion-avatar>  
     <ion-label>Avatar Chip</ion-label>  
     <ion-icon name="close"></ion-icon>  
   </ion-chip>  
 </ion-content>   

Output: After executing this code, you will get the output, as shown below:

Ionic Chip4

Related Topics

Ionic vs Xamarin

Ionic vs Xamarin Ionic and Xamarin are both the most popular frameworks used to develop a hybrid mobile application. Both frameworks are used in large enterprises by the developers. Here, we will discuss the...

4 minutes read.

Ionic Checkbox

Ionic Checkbox Ionic Checkbox is nearly the same as a toggle. It can be placed in an ionic element or used as a separate checkbox. It is designed differently for every platform, such...

2 minutes read.

Ionic Alert

Ionic Alert An Alert is a dialog box that presents the users with important information, or it stores the data from the user by using the inputs. Alerts are a great way to provide...

5 minutes read.

Ionic Slides

The ionic slides component is the multi-section container. You can swipe or drag any segment between them. This contains any number of slides components. Slides help it easy to make galleries, tutorials, and...

2 minutes read.

Ionic Radio

Ionic Radio The radio button is the type of input component that has a Boolean value. The Ionic radio button has a different pattern on every platform, as well as other Ionic components....

2 minutes read.

Difference between Ionic 4 and Ionic 3

The ionic framework is an open-source platform that is used to develop mobile applications. It is also used to build android applications, desktop applications, iOS, and web applications using web technologies like HTML,...

5 minutes read.

Ionic Chip

Ionic chip displays the complex entities in small entities in small blocks, such as the contacts. Ionic chip has several types of elements like avatars, thumbnails, text, and icons. It is a bubble-like...

3 minutes read.

Ionic Select

The Ion Selection component is similar to the HTML <select> element. However, the Ionic Selection component makes it easy for users to categorize and choose the preferred option or other options. You must...

3 minutes read.

Ionic Input

Ionic Input Inputs are necessary to collect and process user inputs securely. To be easy for users to communicate, they must follow the process and communication guidelines for each platform. It is a...

3 minutes read.

Ionic Actionsheet

Ionic Actionsheet The Action sheet is a dialog box that displays a group of options. It is shown on the top of the application content and must be dismissed manually before the user can resume...

3 minutes read.

Ionic Editors

Editors are software programs that permit the users to create and edit the text files. In the development field, editors are usually used to create the source code editors that includes many specific...

3 minutes read.

Ionic List

Ionic List The ionic list is created of several rows of items that can contain text, buttons, thumbnails, keys, icons, and more. Lists are one of the essential components in any web or...

4 minutes read.

Ionic vs Apache Cordova

Ionic Vs Apache Cordova Ionic and Cordova are two popular technology going on in the market for mobile application development. The combination of these two technologies creates a development platform that is known as...

3 minutes read.

Ionic Popover

The Ionic popover is a small dialog box that displays at the top of the screen. It can be used for anything, but it is usually used for a button, an action,...

4 minutes read.

Ionic Infinite Scroll

The infinite scroll permits you to perform an action when the user scrolls a particular content from the bottom or top of the page. When you display the large collection of data...

3 minutes read.

Ionic-fab Button

Ionic-fab Button The Ionic FABs (Floating Action Buttons) are standard material design compounds. It is a container element that contains one or more fab buttons. They are required to be placed in a fixed position,...

2 minutes read.

Ionic progress bar

The ionic progress bar element is a horizontal progress bar used to visualize the progression of operation and activity. You can use the <ion-progress-bar> component to create a progress bar in the ionic...

4 minutes read.

Ionic Colors

Ionic Colors Before we start with the actual elements available in the Ionic frame, let's understand a little bit how Ionic uses colors for different elements. Ionic Color Classes Ionic framework is a set of nine predefined...

3 minutes read.

Ionic Reorder

The Ionic offers the <ion-reorder> component to reordering features. Ionic reorder component adds the Drag and Drop feature to list items, in which the user can change the order of the items. Reorder...

3 minutes read.

Ionic Range

The Range slider lets users choose from a range of values by moving the slider knob. You can accept two knobs, but by default, one-knob controls the range value. Range labels You can put down on...

2 minutes read.