header = CardHeader(header_text="Collapse Widget")
header.add_collapse_button(
text="Show Form",
color="primary",
target="#collapse1",
)
form = MinimalBookForm()
form.helper.form_method = "get"
form_widget = CollapseWidget(
CrispyFormWidget(form=form),
css_id="collapse1",
)
widget = Block(header, form_widget)
widget = HorizontalLayoutBlock(
Block("This is a string block", css_class='border p-3 bg-azure'),
Block("This is a string block", css_class='border p-3 bg-yellow'),
Block("This is a string block", css_class='border p-3 bg-lime'),
Block("This is a string block", css_class='border p-3 bg-cyan'),
)