• 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

ImageSwitch

ImageSwitch is an image gallery component with 25+ effects.

ImageSwitch Tag Documentation

ImageSwitch component is a simple image gallery component.

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.
activeIndex int false 0 Index of the first image.
effect String true Name of the effect for transition.
slideshowAuto boolean false true Starts slideshow automatically on page load.
slideshowSpeed int false 3000 Slideshow speed in milliseconds.
speed int false 500 Speed of the effect in milliseconds.
style String false Inline style of the component.
styleClass String false Style class of the component.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
Manual
Fade
Zoom
TurnDown
Shuffle
Dialog Integration

Usage


<div class="card">
    <h5 style="margin-top:0">Manual</h5>
    <p:commandButton type="button" onclick="PF('switcher').previous()"
                     icon="pi pi-chevron-left" id="prev" styleClass="mr-2 mb-3" />
    <p:commandButton type="button" onclick="PF('switcher').next()"
                     icon="pi pi-chevron-right" id="next" styleClass="mr-2 mb-3" />

    <p:imageSwitch effect="wipe" widgetVar="switcher" id="manuelSwitcher"
                   slideshowAuto="false">
        <ui:repeat value="#{imagesView.images}" var="image" id="manuelSwitcherImages">
            <p:graphicImage name="/demo/images/nature/#{image}" id="image"/>
        </ui:repeat>
    </p:imageSwitch>
</div>

<div class="card">
    <h5>Fade</h5>
    <p:imageSwitch effect="fade" id="fadeEffect">
        <ui:repeat value="#{imagesView.images}" var="image" id="fadeEffectImages">
            <p:graphicImage name="/demo/images/nature/#{image}" id="image2"/>
        </ui:repeat>
    </p:imageSwitch>
</div>

<div class="card">
    <h5>Zoom</h5>
    <p:imageSwitch effect="zoom">
        <ui:repeat value="#{imagesView.images}" var="image">
            <p:graphicImage name="/demo/images/nature/#{image}"/>
        </ui:repeat>
    </p:imageSwitch>
</div>

<div class="card">
    <h5>TurnDown</h5>
    <p:imageSwitch effect="turnDown">
        <ui:repeat value="#{imagesView.images}" var="image">
            <p:graphicImage name="/demo/images/nature/#{image}"/>
        </ui:repeat>
    </p:imageSwitch>
</div>

<div class="card">
    <h5>Shuffle</h5>
    <p:imageSwitch effect="shuffle">
        <ui:repeat value="#{imagesView.images}" var="image">
            <p:graphicImage name="/demo/images/nature/#{image}"/>
        </ui:repeat>
    </p:imageSwitch>
</div>

<div class="card">
    <h5>Dialog Integration</h5>
    <p:commandButton type="button" value="Show" onclick="PF('dlg').show()" icon="pi pi-home"/>

    <p:dialog header="Images" widgetVar="dlg" modal="true"
              draggable="false" resizable="false" showEffect="fade" hideEffect="fade">

        <p:imageSwitch effect="fade">
            <ui:repeat value="#{imagesView.images}" var="image">
                <p:graphicImage name="/demo/images/nature/#{image}"/>
            </ui:repeat>
        </p:imageSwitch>
    </p:dialog>
</div>