wa_copy_button: Create a 'wa-copy-button' component

View source: R/wa_copy_button.R

wa_copy_buttonR Documentation

Create a wa-copy-button component

Description

Generated wrapper for the Web Awesome wa-copy-button component. Generated from Web Awesome metadata.

Usage

wa_copy_button(
  ...,
  id = NULL,
  class = NULL,
  style = NULL,
  value = NULL,
  disabled = NULL,
  copy_label = NULL,
  dir = NULL,
  error_label = NULL,
  feedback_duration = NULL,
  from = NULL,
  lang = NULL,
  success_label = NULL,
  tooltip_placement = NULL,
  copy_icon = NULL,
  error_icon = NULL,
  success_icon = NULL
)

Arguments

...

Child content for the component's default slot.

id

Optional DOM id attribute for HTML, CSS, and JS targeting.

class

Optional CSS class string.

style

Optional inline CSS style string.

value

String. Default: "". The text value to copy.

disabled

Boolean. Default: FALSE. Disables the copy button.

copy_label

String. Default: "". A custom label to show in the tooltip.

dir

String. Optional Web Awesome attribute.

error_label

String. Default: "". A custom label to show in the tooltip when a copy error occurs.

feedback_duration

Number. Default: 1000. The length of time to show feedback before restoring the default trigger.

from

String. Default: "". An id that references an element in the same document from which data will be copied. If both this and value are present, this value will take precedence. By default, the target element's textContent will be copied. To copy an attribute, append the attribute name wrapped in square brackets, e.g. from="elvalue". To copy a property, append a dot and the property name, e.g. from="el.value".

lang

String. Optional Web Awesome attribute.

success_label

String. Default: "". A custom label to show in the tooltip after copying.

tooltip_placement

Enumerated string. Allowed values: bottom, left, right, top. Default: top. The preferred placement of the tooltip.

copy_icon

The icon to show in the default copy state. Works best with ⁠<wa-icon>⁠.

error_icon

The icon to show when a copy error occurs. Works best with ⁠<wa-icon>⁠.

success_icon

The icon to show when the content is copied. Works best with ⁠<wa-icon>⁠.

Value

An HTML tag for the component.

Shiny Bindings

None.


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