• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Chip

Chip represents entities using icons, labels and images.

Chip Tag Documentation

Chip represents entities using icons, labels and images.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
icon String false Defines the icon to display.
image String false Defines the image to display.
label String false Defines the text to display.
removable boolean false false Whether to display a remove icon.
removeIcon String false pi pi-times-circle Icon of the remove element.
style String false Inline style of the component.
styleClass String false Style class of the component.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
Basic
Action
Comedy
Mystery
Thriller
Icon
Apple
Facebook
Google
Microsoft
Image
Amy Elsner
Asiya Javayant
Onyama Limba
Xuxue Feng
Styling
Action
Apple
Onyama Limba
Xuxue Feng
Event
Action
Apple
Onyama Limba
Xuxue Feng

Usage


<style>
    .ui-chip.custom-chip {
        background: var(--p-primary-color);
        color: var(--p-primary-contrast-color);
    }
</style>

<div class="card">
    <h:form>
        <p:growl id="messages" showDetail="true"/>

        <h5>Basic</h5>
        <div class="flex align-items-center flex-wrap">
            <p:chip label="Action" styleClass="mr-2"/>
            <p:chip label="Comedy" styleClass="mr-2"/>
            <p:chip label="Mystery" styleClass="mr-2"/>
            <p:chip label="Thriller" removable="true"/>
        </div>

        <h5>Icon</h5>
        <div class="flex align-items-center flex-wrap">
            <p:chip label="Apple" icon="pi pi-apple" styleClass="mr-2"/>
            <p:chip label="Facebook" icon="pi pi-facebook" styleClass="mr-2"/>
            <p:chip label="Google" icon="pi pi-google" styleClass="mr-2"/>
            <p:chip label="Microsoft" icon="pi pi-microsoft" removable="true"/>
        </div>

        <h5>Image</h5>
        <div class="flex align-items-center flex-wrap">
            <p:chip label="Amy Elsner" image="../../resources/demo/images/avatar/amyelsner.png" styleClass="mr-2"/>
            <p:chip label="Asiya Javayant" image="../../resources/demo/images/avatar/asiyajavayant.png"
                    styleClass="mr-2"/>
            <p:chip label="Onyama Limba" image="../../resources/demo/images/avatar/onyamalimba.png"
                    styleClass="mr-2"/>
            <p:chip label="Xuxue Feng" image="../../resources/demo/images/avatar/xuxuefeng.png"
                    removable="true"/>
        </div>

        <h5>Styling</h5>
        <div class="flex align-items-center flex-wrap">
            <p:chip label="Action" styleClass="mr-2 custom-chip"/>
            <p:chip label="Apple" icon="pi pi-apple" styleClass="mr-2 custom-chip"/>
            <p:chip label="Onyama Limba" image="../../resources/demo/images/avatar/onyamalimba.png"
                    styleClass="mr-2 custom-chip"/>
            <p:chip label="Xuxue Feng" image="../../resources/demo/images/avatar/xuxuefeng.png"
                    styleClass="custom-chip" removable="true"/>
        </div>

        <h5>Event</h5>
        <div class="flex align-items-center flex-wrap">
            <p:chip label="Action" styleClass="mr-2">
                <p:ajax listener="#{chipView.onSelect}" update="messages"/>
            </p:chip>
            <p:chip label="Apple" icon="pi pi-apple" styleClass="mr-2" removable="true">
                <p:ajax listener="#{chipView.onSelect}" update="messages"/>
                <p:ajax event="close" listener="#{chipView.onClose}" update="messages"/>
            </p:chip>
            <p:chip label="Onyama Limba" image="../../resources/demo/images/avatar/onyamalimba.png"
                    styleClass="mr-2" removable="true">
                <p:ajax listener="#{chipView.onSelect}" update="messages"/>
                <p:ajax event="close" listener="#{chipView.onClose}" update="messages"/>
            </p:chip>
            <p:chip label="Xuxue Feng" image="../../resources/demo/images/avatar/xuxuefeng.png"
                    removable="true">
                <p:ajax listener="#{chipView.onSelect}" update="messages"/>
                <p:ajax event="close" listener="#{chipView.onClose}" update="messages"/>
            </p:chip>
        </div>

    </h:form>
</div>