Locale

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

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

FileUpload Drag and Drop

In supported browsers, a file can be selected by dragdrop from filesystem. FileUpload component itself is the drop zone.

Basic
Choose
Drop Zone
Drop on the text area to upload, or choose.

<style>
    body .ui-inputfield.ui-state-drag {
        background: #ffffd6;
    }
</style>

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

        <h5>Basic</h5>
        <p:fileUpload listener="#{fileUploadView.handleFileUpload}" mode="advanced" dragDropSupport="true"
                      update="messages">
                <p:validateFile sizeLimit="100000" allowTypes="/(\.|\/)(gif|jpeg|jpg|png)$/" />
        </p:fileUpload>

        <h5>Drop Zone</h5>
        <div class="ui-fluid">
            <div class="field">
                <p:inputTextarea id="customDropZone" widgetVar="textarea"
                                 rows="5" value="#{fileUploadView.dropZoneText}"/>
                <small>
                    Drop on the text area to upload, or
                    <p:link value="choose" onclick="PF('uploadDnd').show();return false" style="font-size:inherit"/>.
                </small>
            </div>
        </div>
        <p:fileUpload widgetVar="uploadDnd" listener="#{fileUploadView.handleFileUploadTextarea}"
                      sizeLimit="100000" allowTypes="/(\.|\/)(gif|jpeg|jpg|png)$/" dropZone="customDropZone"
                      style="display: none"/>
    </h:form>
</div>