wa_details: Create a 'wa-details' component

View source: R/wa_details.R

wa_detailsR Documentation

Create a wa-details component

Description

Generated wrapper for the Web Awesome wa-details component. When used as a Shiny input, ⁠input$<input_id>⁠ reflects the component's current semantic open state. The Shiny value is returned as a logical value. Generated from Web Awesome metadata.

Usage

wa_details(
  input_id,
  ...,
  class = NULL,
  style = NULL,
  disabled = NULL,
  name = NULL,
  appearance = NULL,
  dir = NULL,
  icon_placement = NULL,
  lang = NULL,
  open = NULL,
  summary = NULL,
  collapse_icon = NULL,
  expand_icon = NULL,
  summary_slot = NULL
)

Arguments

input_id

Shiny input id for the component. This is also used as the rendered DOM id attribute.

...

Child content for the component's default slot.

class

Optional CSS class string.

style

Optional inline CSS style string.

disabled

Boolean. Default: FALSE. Disables the details so it can't be toggled.

name

String. Groups related details elements. When one opens, others with the same name will close.

appearance

Enumerated string. Allowed values: filled, filled-outlined, outlined, plain. Default: outlined. The element's visual appearance.

dir

String. Optional Web Awesome attribute.

icon_placement

Enumerated string. Allowed values: end, start. Default: end. The location of the expand/collapse icon.

lang

String. Optional Web Awesome attribute.

open

Boolean. Default: FALSE. Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you can use the show() and hide() methods and this attribute will reflect the details' open state.

summary

String. The summary to show in the header. If you need to display HTML, use the summary slot instead.

collapse_icon

Optional collapse icon to use instead of the default. Works best with ⁠<wa-icon>⁠.

expand_icon

Optional expand icon to use instead of the default. Works best with ⁠<wa-icon>⁠.

summary_slot

The details' summary. Alternatively, you can use the summary attribute.

Value

An HTML tag for the component.

Shiny Bindings

⁠input$<input_id>⁠ reflects the component's current semantic open state. The Shiny value is returned as a logical value.


shiny.webawesome documentation built on April 22, 2026, 1:09 a.m.