Package org.patternfly.component.card
package org.patternfly.component.card
Provides the PatternFly card component and its subcomponents for displaying information in a contained, flexible layout.
An expandable card with header, actions, and expandable content:
A card is a square or rectangular container that can contain any kind of content. Cards symbolize units of information and allow users to interact with a collection of related information. Cards can be composed with a title, body, footer, header, and actions using the fluent builder API.
Usage
A basic card with title, body, and footer:import static org.patternfly.component.card.Card.card;
import static org.patternfly.component.card.CardBody.cardBody;
import static org.patternfly.component.card.CardFooter.cardFooter;
import static org.patternfly.component.card.CardTitle.cardTitle;
card()
.addTitle(cardTitle("Title"))
.addBody(cardBody().text("Body"))
.addFooter(cardFooter().text("Footer"));
import static org.patternfly.component.card.Card.card;
import static org.patternfly.component.card.CardBody.cardBody;
import static org.patternfly.component.card.CardExpandableContent.cardExpandableContent;
import static org.patternfly.component.card.CardFooter.cardFooter;
import static org.patternfly.component.card.CardHeader.cardHeader;
import static org.patternfly.component.card.CardTitle.cardTitle;
card().expandable()
.addHeader(cardHeader()
.addTitle(cardTitle("Title")))
.addExpandableContent(cardExpandableContent()
.addBody(cardBody().text("Body"))
.addFooter(cardFooter().text("Footer")));
- See Also:
-
ClassesClassDescriptionA card is a square or rectangular container that can contain any kind of content.