Package org.patternfly.component.button
package org.patternfly.component.button
Provides the PatternFly button component for triggering actions and navigation.
A button is a box area or text that communicates and triggers user actions when clicked or selected. PatternFly supports several button styling variants including primary, secondary, tertiary, danger, warning, link, plain, and control. Buttons can also include icons, progress indicators, and badge counts.
Usage
Button variants:
Button primary = button("Primary").primary();
Button secondary = button("Secondary").secondary();
Button danger = button("Danger").danger();
Button link = button("Link").link();
Button plain = button().icon(times()).plain();
Buttons with icons, progress, and click handlers:
Button withIcon = button()
.iconAndText(plusCircle(), "Add item", start)
.link();
Button withProgress = button("Submit").primary()
.progress(true)
.onClick((event, btn) -> btn.toggleProgress());
Button withBadge = button("Issues").primary()
.addBadge(badge(7).unread());
- See Also:
-
ClassesClassDescriptionA button is a box area or text that communicates and triggers user actions when clicked or selected.