arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
Counter
Counter animates a numerical value by counting to it.
Basic Usage
Start Value
Count Down
Decimal Places
Separators
Locale
Prefix Suffix
AJAX and Events
Source

                <h:panelGrid columns="2" columnClasses="normal, bold">
        <h:outputText value="Basic Usage"/>
        <pe:counter end="9000" separator=""/>
        <h:outputText value="Start Value"/>
        <pe:counter end="9000" start="1000"/>
        <h:outputText value="Count Down"/>
        <pe:counter start="9000" end="1000"/>
        <h:outputText value="Decimal Places"/>
        <pe:counter end="9000" decimals="2"/>
        <h:outputText value="Separators"/>
        <pe:counter end="9000" decimals="2" separator="." decimal=","/>
        <h:outputText value="Locale"/>
        <pe:counter end="9000" locale="fr_FR" decimals="2"/>
        <h:outputText value="Prefix Suffix"/>
        <pe:counter end="9000" prefix="USD " suffix=" $" style="background-color:black;color:MediumSeaGreen;"/>
        <h:outputText value="AJAX and Events"/>
        <pe:counter start="0" end="9000" duration="5" onstart="console.log('STARTED')" onend="console.log('ENDED')" autoStart="true">
            <p:ajax event="start" listener="#{counterController.startListener}"/>
            <p:ajax event="end" listener="#{counterController.endListener}"/>
        </pe:counter>
    </h:panelGrid>
            
Components and more
Use Cases
Documentation pe:counter
Attributes (move mouse over the names to see data types)
Name Description
autoStartWhether to start the counter automatically.Default is true.
bindingAn EL expression referring to a server side UIComponent instance in a backing bean.Default is generated.
decimalDecimal separator character.
decimalsNumber of decimal places.Default is 0.
durationAnimation duration in seconds.Default is 2.
endEnding value for the counter.
idUnique identifier of the component in a namingContainer.Default is generated.
localeLocale for number formatting. Can be a string or java.util.Locale instance.
onendClient-side callback when the counter animation ends.
onstartClient-side callback when the counter animation starts.
prefixText to display before the number.
renderedBoolean value to specify the rendering of the component, when set to false component will not be rendered.Default is true.
separatorThousands grouping separator character.
smartEasingAmountAmount for smart easing.Default is 333.
smartEasingThresholdThreshold for smart easing.Default is 999.
startStarting value for the counter.Default is 0.0.
styleInline style of the component.
styleClassStyle class of the component.
suffixText to display after the number.
useEasingWhether to use easing in the animation.Default is true.
useGroupingWhether to use grouping separators (e.g. 1,000).Default is true.
visibleWhether the component is initially visible.Default is true.
widgetVarName of the client side widget.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 16.0.0-SNAPSHOT,PrimeFaces Extensions: 16.0.0-SNAPSHOT,JSF: Apache MyFaces Core 4.0 - Impl 4.0.3,Server: Apache Tomcat (TomEE)/10.1.52 (10.1.4),Build time: 2026-03-07 01:34