Tailwind Chips
Tags: tailwindcss, webdev
Published: 2021-10-21 11:53:10

Responsive chips built with the latest Tailwind. Chips (aka tags) make it easier to categorize content and browse ie. through different articles from the same category.



______

## Installation

#### Quick Start

In order to start using Tailwind simply download our starter.

[DOWNLOAD ZIP STARTER](http://tailwind-elements.com/tw-starter.zip)

Tailwind Elements does not change or add any CSS to the already one from TailwindCSS.

You can directly copy our components into your Tailwind design and they will work straight away.

In some dynamic components (like dropdowns or modals) we add Font Awesome icons and custom JavaScript. However, they do not require any additional installation, all the necessary code is always included in the example and copied to any Tailwind project - it will work.


_______

#### MDB GO

{% youtube RAhugF8NOBs %}
_______

## Customization

##### Basic example



###### HTML
```html
<div class="flex flex-wrap justify-center">
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-gray-700 bg-gray-100 border border-gray-300"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-blue-700 bg-blue-100 border border-blue-300"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-pink-700 bg-pink-100 border border-pink-300"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-purple-700 bg-purple-100 border border-purple-300"
  >
    <span slot="avatar">
      <span
        class="flex relative w-4 h-4 bg-orange-500 justify-center items-center m-1 mr-2 ml-0 my-0 text-xs rounded-full"
        ><img
          class="rounded-full"
          alt="A"
          src="https://randomuser.me/api/portraits/women/68.jpg"
        />
      </span>
    </span>
    <span
      class="text-xs font-normal leading-none max-w-full flex-initial"
    >
      Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-red-100 bg-red-700 border border-red-700"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-orange-100 bg-orange-700 border border-orange-700"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-green-700 bg-green-100 border border-green-300"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-indigo-100 bg-indigo-700 border border-indigo-700"
  >
    <span class="text-xs font-normal leading-none max-w-full flex-initial"
      >Hello!</span
    >
    <span class="flex flex-auto flex-row-reverse">
      <span>
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="100%"
          height="100%"
          fill="none"
          viewBox="0 0 24 24"
          stroke="currentColor"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-x cursor-pointer hover:text-indigo-400 rounded-full w-4 h-4 ml-2"
        >
          <line x1="18" y1="6" x2="6" y2="18"></line>
          <line x1="6" y1="6" x2="18" y2="18"></line>
        </svg>
      </span>
    </span>
  </span>
  <span
    class="flex justify-center items-center m-1 font-medium py-1 px-2 bg-white rounded-full text-yellow-100 bg-yellow-700 border border-yellow-700"
  >
    <span slot="avatar">
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="100%"
        height="100%"
        fill="none"
        viewBox="0 0 24 24"
        stroke="currentColor"
        stroke-width="2"
        stroke-linecap="round"
        stroke-linejoin="round"
        class="feather feather-heart w-3 mr-1"
      >
        <path
          d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"
        ></path>
      </svg>
    </span>
    <span
      class="text-xs font-normal leading-none max-w-full flex-initial"
    >
      Hello!</span
    >
    <span class="flex flex-auto flex-row-reverse">
      <span>
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="100%"
          height="100%"
          fill="none"
          viewBox="0 0 24 24"
          stroke="currentColor"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-x cursor-pointer hover:text-yellow-400 rounded-full w-4 h-4 ml-2"
        >
          <line x1="18" y1="6" x2="6" y2="18"></line>
          <line x1="6" y1="6" x2="18" y2="18"></line>
        </svg>
      </span>
    </span>
  </span>
</div>
```

##### Chips large solid color

###### HTML
```html
<div class="flex space-x-2">
  <span
    class="text-xs px-3 font-medium text-base bg-gray-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
  <span
    class="text-xs px-3 font-medium text-base bg-red-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>

  <span
    class="text-xs px-3 font-medium text-base bg-yellow-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
  <span
    class="text-xs px-3 font-medium text-base bg-green-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>

  <span
    class="text-xs px-3 font-medium text-base bg-blue-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
  <span
    class="text-xs px-3 font-medium text-base bg-purple-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
  <span
    class="text-xs px-3 font-medium text-base bg-indigo-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
  <span
    class="text-xs px-3 font-medium text-base bg-pink-500 text-white rounded-full py-1.5"
  >
    Badge
  </span>
</div>
```





#### You can see more customization examples on the [📄 Chips documentation page](https://tailwind-elements.com/docs/standard/components/chips/)

______

## Crucial Resources

Here are the resources that we have prepared to help you work with this component:

1. Read [📄 Chips documentation page](https://tailwind-elements.com/docs/standard/components/chips/) <-- start here
2. In to get the most out of your project, you should also get acquainted with other Components options related to Chips. See the section below to find the list of them.
3. After finishing the project you can publish it with CLI in order to receive [💽 Free hosting (beta)](https://mdbootstrap.com/docs/standard/cli/)

-----

## Related Components options & features
- [Accordion](https://tailwind-elements.com/docs/standard/components/accordion/)
- [Alerts](https://tailwind-elements.com/docs/standard/components/alerts/)
- [Badges](https://tailwind-elements.com/docs/standard/components/badges/)
- [Button group](https://tailwind-elements.com/docs/standard/components/button-group/)
- [Buttons](https://tailwind-elements.com/docs/standard/components/buttons/)
- [Cards](https://tailwind-elements.com/docs/standard/components/cards/)
- [Carousel](https://tailwind-elements.com/docs/standard/components/carousel/)
- [Charts](https://tailwind-elements.com/docs/standard/components/charts/)
- [Dropdown](https://tailwind-elements.com/docs/standard/components/dropdown/)
- [Gallery](https://tailwind-elements.com/docs/standard/components/gallery/)
- [Headings](https://tailwind-elements.com/docs/standard/components/headings/)
- [Images](https://tailwind-elements.com/docs/standard/components/images/)
- [List group](https://tailwind-elements.com/docs/standard/components/listgroup/)
- [Modal](https://tailwind-elements.com/docs/standard/components/modal/)
- [Paragraphs](https://tailwind-elements.com/docs/standard/components/Paragraphs/)
- [Popover](https://tailwind-elements.com/docs/standard/components/popover/)
- [Progress](https://tailwind-elements.com/docs/standard/components/progress/)
- [Rating](https://tailwind-elements.com/docs/standard/components/rating/)
- [Spinners](https://tailwind-elements.com/docs/standard/components/spinners/)
- [Stepper](https://tailwind-elements.com/docs/standard/components/stepper/)
- [Tables](https://tailwind-elements.com/docs/standard/components/tables/)
- [Template](https://tailwind-elements.com/docs/standard/components/template/)
- [Toast](https://tailwind-elements.com/docs/standard/components/toast/)
- [Tooltip](https://tailwind-elements.com/docs/standard/components/tooltip/)


-----

## Additional resources

Learn web development with our **learning roadmap**:
**[:mortar_board: Start Learning](https://mdbootstrap.com/docs/standard/getting-started/)**

Join our mailing list & receive **exclusive resources** for developers
**[:gift: Get gifts](https://mdbootstrap.com/newsletter/)**

Join our private FB group for **inspiration & community experience**
**[👨‍👩‍👧‍👦 Ask to join](https://www.facebook.com/groups/682245759188413)**

**Support creation of open-source packages** with a STAR on GitHub
[![GitHub stars](https://img.shields.io/github/stars/dawidadach/Tailwind-Elements.svg?style=social&label=Star&maxAge=2592000)](https://github.com/dawidadach/Tailwind-Elements/)