Skip to content

Details

An expand/collapse disclosure widget. The summary is always visible; the content is shown or hidden by the user.

Details.builder()
.summary(new Text("More information"))
.content(new Text("Here is the hidden content."))
.build()
PropertyTypeDefaultDescription
summaryComponentAlways-visible toggle header
contentComponentContent shown when expanded
openedbooleanfalseWhether the panel starts expanded
styleStringInline CSS
cssClassesStringCSS class names
Details.builder()
.summary(new Text("Invoices"))
.content(invoiceList)
.opened(true)
.build()
Details.builder()
.summary(new HorizontalLayout(
new Icon(IconKey.Document),
new Text("Pending invoices")
))
.content(VerticalLayout.builder()
.spacing(true)
.content(List.of(
new Text("1,000 invoices pending."),
new Text("Total: €34,213.01"),
new Anchor("View all", "/invoices")
))
.build())
.opened(false)
.build()