Shiny Integration
The accordion item emits events when it's expanded or collapsed.
Available properties in input$id:
$expanded - Whether the item is currently expanded
$heading - The heading text
$description - The description text
Other component properties
Basic usage:
calcite_accordion_item(
id = "item1",
heading = "Watercraft",
description = "Yachts, boats, and dinghies",
icon_start = "embark",
# Item content...
)# In server
observeEvent(input$item1$expanded, {
if (input$item1$expanded) {
message("Item was expanded")
} else {
message("Item was collapsed")
}
})