| Title: | 'shiny' Bindings for 'Web Awesome' Components |
| Version: | 1.0.0 |
| Description: | Provides an 'R' and 'shiny' interface to the 'Web Awesome' component library. The package is generator-driven, exposing 'Web Awesome' web components as 'R' functions that produce HTML tags and integrate with the reactive model that 'shiny' uses. |
| URL: | https://github.com/mbanand/shiny.webawesome, https://www.shiny-webawesome.org |
| BugReports: | https://github.com/mbanand/shiny.webawesome/issues |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | htmltools, shiny |
| RoxygenNote: | 7.3.3 |
| Suggests: | chromote, covr, devtools, digest, document, jsonlite, knitr, lintr, processx, pkgdown, rmarkdown, rhub, shinytest2, styler, testthat (≥ 3.0.0), urlchecker, withr, yaml |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-04-17 15:45:14 UTC; vmuser |
| Author: | M. B. Anand [aut, cre] |
| Maintainer: | M. B. Anand <privateanand@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-04-21 19:32:09 UTC |
shiny.webawesome: Shiny Bindings for Web Awesome Components
Description
Provides an R and Shiny interface to the Web Awesome component library.
Details
shiny.webawesome is a generator-driven package that exposes Web Awesome
components as R functions for use in Shiny applications. Most component
wrappers are generated from the upstream Web Awesome metadata file
custom-elements.json, which the package treats as its primary component
source of truth.
The package aims to stay close to upstream Web Awesome names, conventions, and component APIs while adopting normal R conventions such as snake_case argument names. Because Web Awesome lives in the browser and Shiny spans both server and client, the package also includes a curated Shiny binding layer plus a small set of package-level helpers for layout, browser commands, and app-local JavaScript.
Main package surfaces
The package exposes several complementary surfaces:
generated component wrappers such as
wa_button()andwa_select()layout helpers such as
webawesomePage()andwa_container()generated Shiny bindings and update helpers for selected interactive components
command-layer helpers such as
wa_set_property()andwa_call_method()the narrow browser-glue helper
wa_js()the package helper
wa_version()for reporting the bundled Web Awesome version
Package options
The package currently uses the option shiny.webawesome.warnings to control
selected runtime warnings and diagnostics.
This option should be a named list. Known keys currently include:
-
missing_tree_item_id -
command_layer -
command_layer_debug
Example:
options(shiny.webawesome.warnings = list(command_layer_debug = TRUE))
Learn more
For an introductory guide, see
vignette("get-started", package = "shiny.webawesome"). For
function-specific details, use the package help pages such as
?webawesomePage, ?wa_set_property, ?wa_call_method, ?wa_js, and
?wa_version.
Author(s)
Maintainer: M. B. Anand privateanand@gmail.com
See Also
Useful links:
Report bugs at https://github.com/mbanand/shiny.webawesome/issues
Send one generic shiny.webawesome browser command
Description
Sends a one-way command from the Shiny server to a browser element targeted
by DOM id. This is an internal transport helper used by package-level
command helpers such as wa_set_property() and wa_call_method().
Usage
.wa_send_command(
id,
command,
payload = list(),
session = shiny::getDefaultReactiveDomain()
)
Arguments
id |
DOM |
command |
Scalar command name. |
payload |
Optional command payload list. |
session |
Shiny session object. Defaults to the current reactive domain. |
Value
Invisibly returns NULL.
Create a wa-animated-image component
Description
Generated wrapper for the Web Awesome wa-animated-image component.
Generated from Web Awesome metadata.
Usage
wa_animated_image(
...,
id = NULL,
class = NULL,
style = NULL,
alt = NULL,
dir = NULL,
lang = NULL,
play = NULL,
src = NULL,
pause_icon = NULL,
play_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. |
alt |
String. A description of the image used by assistive devices. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
play |
Boolean. Default: |
src |
String. The path to the image to load. |
pause_icon |
Optional pause icon to use instead of the default.
Works best with |
play_icon |
Optional play icon to use instead of the default.
Works best with |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-animation component
Description
Generated wrapper for the Web Awesome wa-animation component.
Generated from Web Awesome metadata.
Usage
wa_animation(
...,
id = NULL,
class = NULL,
style = NULL,
name = NULL,
delay = NULL,
dir = NULL,
direction = NULL,
duration = NULL,
easing = NULL,
end_delay = NULL,
fill = NULL,
iteration_start = NULL,
iterations = NULL,
lang = NULL,
play = NULL,
playback_rate = 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. |
name |
String. Default: |
delay |
Number. Default: |
dir |
String. Optional Web Awesome attribute. |
direction |
Default: |
duration |
Number. Default: |
easing |
String. Default: |
end_delay |
Number. Default: |
fill |
Default: |
iteration_start |
Number. Default: |
iterations |
Number. Default: |
lang |
String. Optional Web Awesome attribute. |
play |
Boolean. Default: |
playback_rate |
Number. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-avatar component
Description
Generated wrapper for the Web Awesome wa-avatar component.
Generated from Web Awesome metadata.
Usage
wa_avatar(
...,
id = NULL,
class = NULL,
style = NULL,
label = NULL,
dir = NULL,
image = NULL,
initials = NULL,
lang = NULL,
loading = NULL,
shape = NULL,
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. |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
image |
String. Default: |
initials |
String. Default: |
lang |
String. Optional Web Awesome attribute. |
loading |
Enumerated string. Allowed values: |
shape |
Enumerated string. Allowed values: |
icon |
The default icon to use when no image or initials are
present. Works best with |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-badge component
Description
Generated wrapper for the Web Awesome wa-badge component.
Generated from Web Awesome metadata.
Usage
wa_badge(
...,
id = NULL,
class = NULL,
style = NULL,
appearance = NULL,
attention = NULL,
dir = NULL,
lang = NULL,
pill = NULL,
variant = NULL,
end = NULL,
start = 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. |
appearance |
Enumerated string. Allowed values: |
attention |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
pill |
Boolean. Default: |
variant |
Enumerated string. Allowed values: |
end |
An element, such as |
start |
An element, such as |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-breadcrumb component
Description
Generated wrapper for the Web Awesome wa-breadcrumb component.
Generated from Web Awesome metadata.
Usage
wa_breadcrumb(
...,
id = NULL,
class = NULL,
style = NULL,
label = NULL,
dir = NULL,
lang = NULL,
separator = 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. |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
separator |
The separator to use between breadcrumb items. Works
best with |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-breadcrumb-item component
Description
Generated wrapper for the Web Awesome wa-breadcrumb-item component.
Generated from Web Awesome metadata.
Usage
wa_breadcrumb_item(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
href = NULL,
lang = NULL,
rel = NULL,
target = NULL,
end = NULL,
separator = NULL,
start = 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. |
dir |
String. Optional Web Awesome attribute. |
href |
String. Optional URL to direct the user to when the breadcrumb item is activated. When set, a link will be rendered internally. When unset, a button will be rendered instead. |
lang |
String. Optional Web Awesome attribute. |
rel |
String. Default: |
target |
Enumerated string. Allowed values: |
end |
An element, such as |
separator |
The separator to use for the breadcrumb item. This
will only change the separator for this item. If you want to change it
for all items in the group, set the separator on |
start |
An element, such as |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-button component
Description
Generated wrapper for the Web Awesome wa-button component. When used
as a Shiny input, the component exposes action semantics through
input$<input_id>. The Shiny input invalidates on each committed
action rather than publishing a durable value payload. Each committed
action publishes a numeric action value.
Generated from Web Awesome metadata.
Usage
wa_button(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
name = NULL,
appearance = NULL,
custom_error = NULL,
dir = NULL,
download = NULL,
formaction = NULL,
formenctype = NULL,
formmethod = NULL,
formnovalidate = NULL,
formtarget = NULL,
href = NULL,
lang = NULL,
loading = NULL,
pill = NULL,
rel = NULL,
size = NULL,
target = NULL,
title = NULL,
type = NULL,
variant = NULL,
with_caret = NULL,
with_end = NULL,
with_start = NULL,
end = NULL,
start = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
String. The value of the button, submitted as a pair with
the button's name as part of the form data, but only when this button
is the submitter. This attribute is ignored when |
disabled |
Boolean. Default: |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
download |
String. Tells the browser to download the linked file
as this filename. Only used when |
formaction |
String. Used to override the form owner's |
formenctype |
Enumerated string. Allowed values:
|
formmethod |
Enumerated string. Allowed values: |
formnovalidate |
Boolean. Default: |
formtarget |
Used to override the form owner's |
href |
String. When set, the underlying button will be rendered as
an |
lang |
String. Optional Web Awesome attribute. |
loading |
Boolean. Default: |
pill |
Boolean. Default: |
rel |
String. When using |
size |
Enumerated string. Allowed values: |
target |
Enumerated string. Allowed values: |
title |
String. Default: |
type |
Enumerated string. Allowed values: |
variant |
Enumerated string. Allowed values: |
with_caret |
Boolean. Default: |
with_end |
Boolean. Default: |
with_start |
Boolean. Default: |
end |
An element, such as |
start |
An element, such as |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> uses action semantics and invalidates on each
committed action rather than publishing a durable value payload. The
Shiny action value is returned as a numeric action value.
Create a wa-button-group component
Description
Generated wrapper for the Web Awesome wa-button-group component.
Generated from Web Awesome metadata.
Usage
wa_button_group(
...,
id = NULL,
class = NULL,
style = NULL,
label = NULL,
dir = NULL,
lang = NULL,
orientation = 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. |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Call one browser-side method on a target element
Description
Sends a one-way command from the Shiny server that invokes a browser-side
method on the element identified by DOM id.
Usage
wa_call_method(
id,
method,
args = list(),
session = shiny::getDefaultReactiveDomain()
)
Arguments
id |
DOM |
method |
Scalar method name to invoke on the target element. |
args |
Optional list of positional arguments to pass to the method. These should be serializable through Shiny's custom-message transport. In practice, prefer JSON-like scalar values or nested lists that map cleanly to browser values. Do not expect R functions, language objects, or HTML tags to serialize into useful method arguments. |
session |
Shiny session object. Defaults to the current reactive domain. |
Details
wa_call_method() is a narrow package-level escape hatch for advanced
cases where a Web Awesome component method needs to be triggered from server
logic but is not covered by a generated helper. It does not validate whether
the requested method exists for the targeted component.
This helper is complementary to generated component bindings and update helpers. It is not part of upstream component coverage and does not expand the generated per-component API surface.
On the server side, wa_call_method() validates only its R helper inputs,
such as the target id, method name, argument list, and session. It does
not validate whether the requested method exists on the browser-side
element.
In the browser runtime, the command layer validates that the target DOM
id resolves to an element, that a method name was supplied, and that the
named member is callable on the target element before invoking it.
Command-layer warnings are controlled by the package warning registry,
especially the command_layer key. For option details, see the Package
Options article.
Value
Invisibly returns NULL.
Examples
library(shiny)
library(shiny.webawesome)
ui <- webawesomePage(
wa_button("Show dialog", id = "show_dialog"),
wa_dialog("Dialog body", id = "dialog")
)
server <- function(input, output, session) {
observeEvent(input$show_dialog, {
wa_call_method("dialog", "show", session = session)
})
}
app <- shinyApp(ui, server)
stopifnot(inherits(app, "shiny.appobj"))
# Run `app` interactively to launch this example application.
Create a wa-callout component
Description
Generated wrapper for the Web Awesome wa-callout component.
Generated from Web Awesome metadata.
Usage
wa_callout(
...,
id = NULL,
class = NULL,
style = NULL,
appearance = NULL,
dir = NULL,
lang = NULL,
size = NULL,
variant = NULL,
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. |
appearance |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
size |
Enumerated string. Allowed values: |
variant |
Enumerated string. Allowed values: |
icon |
An icon to show in the callout. Works best with
|
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-card component
Description
Generated wrapper for the Web Awesome wa-card component.
Generated from Web Awesome metadata.
Usage
wa_card(
...,
id = NULL,
class = NULL,
style = NULL,
appearance = NULL,
dir = NULL,
lang = NULL,
orientation = NULL,
with_footer = NULL,
with_header = NULL,
with_media = NULL,
actions = NULL,
footer = NULL,
footer_actions = NULL,
header = NULL,
header_actions = NULL,
media = 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. |
appearance |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
with_footer |
Boolean. Default: |
with_header |
Boolean. Default: |
with_media |
Boolean. Default: |
actions |
An optional actions section to render at the end for the horizontal card. |
footer |
An optional footer for the card. |
footer_actions |
An optional actions section to render in the footer of the vertical card. |
header |
An optional header for the card. |
header_actions |
An optional actions section to render in the header of the vertical card. |
media |
An optional media section to render at the start of the card. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-carousel component
Description
Generated wrapper for the Web Awesome wa-carousel component. When
used as a Shiny input, input$<input_id> reflects the component's
current semantic activeSlide state. The Shiny value is returned as a
numeric value. This index is 0-based.
Generated from Web Awesome metadata.
Usage
wa_carousel(
input_id,
...,
class = NULL,
style = NULL,
autoplay = NULL,
autoplay_interval = NULL,
current_slide = NULL,
dir = NULL,
lang = NULL,
loop = NULL,
mouse_dragging = NULL,
navigation = NULL,
orientation = NULL,
pagination = NULL,
slides = NULL,
slides_per_move = NULL,
slides_per_page = NULL,
next_icon = NULL,
previous_icon = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
autoplay |
Boolean. Default: |
autoplay_interval |
Number. Default: |
current_slide |
Number. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
loop |
Boolean. Default: |
mouse_dragging |
Boolean. Default: |
navigation |
Boolean. Default: |
orientation |
Enumerated string. Allowed values: |
pagination |
Boolean. Default: |
slides |
Number. Default: |
slides_per_move |
Number. Default: |
slides_per_page |
Number. Default: |
next_icon |
Optional next icon to use instead of the default.
Works best with |
previous_icon |
Optional previous icon to use instead of the
default. Works best with |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current semantic
activeSlide state. The Shiny value is returned as a numeric value.
This index is 0-based.
Create a wa-carousel-item component
Description
Generated wrapper for the Web Awesome wa-carousel-item component.
Generated from Web Awesome metadata.
Usage
wa_carousel_item(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
lang = 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. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-checkbox component
Description
Generated wrapper for the Web Awesome wa-checkbox component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value. The Shiny value is returned as a logical value.
Generated from Web Awesome metadata.
Usage
wa_checkbox(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
checked = NULL,
disabled = NULL,
hint = NULL,
name = NULL,
custom_error = NULL,
dir = NULL,
indeterminate = NULL,
lang = NULL,
required = NULL,
size = NULL,
title = NULL,
hint_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
String. The value of the checkbox, submitted as a name/value pair with form data. |
checked |
Boolean. Default: |
disabled |
Boolean. Default: |
hint |
String. Default: |
name |
String. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
indeterminate |
Boolean. Default: |
lang |
String. Optional Web Awesome attribute. |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
title |
String. Default: |
hint_slot |
Text that describes how to use the checkbox.
Alternatively, you can use the |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value. The
Shiny value is returned as a logical value.
Create a wa-color-picker component
Description
Generated wrapper for the Web Awesome wa-color-picker component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value.
Generated from Web Awesome metadata.
Usage
wa_color_picker(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
custom_error = NULL,
dir = NULL,
format = NULL,
lang = NULL,
opacity = NULL,
open = NULL,
placement = NULL,
required = NULL,
size = NULL,
swatches = NULL,
uppercase = NULL,
with_hint = NULL,
with_label = NULL,
without_format_toggle = NULL,
hint_slot = NULL,
label_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
String. The default value of the form control. Primarily
used for resetting the form control. This wrapper argument sets the
HTML |
disabled |
Boolean. Default: |
label |
String. Default: |
hint |
String. Default: |
name |
String. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
format |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
opacity |
Boolean. Default: |
open |
Boolean. Default: |
placement |
Enumerated string. Allowed values: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
swatches |
Default: |
uppercase |
Boolean. Default: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
without_format_toggle |
Boolean. Default: |
hint_slot |
The color picker's form hint. Alternatively, you can
use the |
label_slot |
The color picker's form label. Alternatively, you can
use the |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Create a wa-comparison component
Description
Generated wrapper for the Web Awesome wa-comparison component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value.
Generated from Web Awesome metadata.
Usage
wa_comparison(
input_id,
...,
class = NULL,
style = NULL,
dir = NULL,
lang = NULL,
position = NULL,
after = NULL,
before = NULL,
handle = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
position |
Number. Default: |
after |
The after content, often an |
before |
The before content, often an |
handle |
The icon used inside the handle. |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Construct a shiny.webawesome container
Description
Creates a convenience <div> container for layouts and utility-class usage
within the shiny.webawesome package API. wa_container() is complementary
to htmltools::tags$div() and is not a wrapper for an upstream Web Awesome
component.
Usage
wa_container(..., id = NULL, class = NULL, style = NULL)
Arguments
... |
UI children and additional HTML attributes for the container. |
id |
Optional DOM |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
Details
The helper attaches the shiny.webawesome dependency so Web Awesome utility classes can be used even when no generated component wrappers appear in the same UI subtree.
Value
A <div> tag with the shiny.webawesome dependency attached.
Examples
container <- wa_container(
class = "wa-stack",
wa_card("First card"),
wa_card("Second card")
)
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: |
disabled |
Boolean. Default: |
copy_label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
error_label |
String. Default: |
feedback_duration |
Number. Default: |
from |
String. Default: |
lang |
String. Optional Web Awesome attribute. |
success_label |
String. Default: |
tooltip_placement |
Enumerated string. Allowed values: |
copy_icon |
The icon to show in the default copy state. Works best
with |
error_icon |
The icon to show when a copy error occurs. Works best
with |
success_icon |
The icon to show when the content is copied. Works
best with |
Value
An HTML tag for the component.
Shiny Bindings
None.
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 |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
disabled |
Boolean. Default: |
name |
String. Groups related details elements. When one opens, others with the same name will close. |
appearance |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
icon_placement |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
open |
Boolean. Default: |
summary |
String. The summary to show in the header. If you need
to display HTML, use the |
collapse_icon |
Optional collapse icon to use instead of the
default. Works best with |
expand_icon |
Optional expand icon to use instead of the default.
Works best with |
summary_slot |
The details' summary. Alternatively, you can use
the |
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.
Create a wa-dialog component
Description
Generated wrapper for the Web Awesome wa-dialog 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_dialog(
input_id,
...,
class = NULL,
style = NULL,
label = NULL,
dir = NULL,
lang = NULL,
light_dismiss = NULL,
open = NULL,
with_footer = NULL,
without_header = NULL,
footer = NULL,
header_actions = NULL,
label_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
light_dismiss |
Boolean. Default: |
open |
Boolean. Default: |
with_footer |
Boolean. Default: |
without_header |
Boolean. Default: |
footer |
The dialog's footer, usually one or more buttons representing various options. |
header_actions |
Optional actions to add to the header. Works best
with |
label_slot |
The dialog's label. Alternatively, you can use the
|
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.
Create a wa-divider component
Description
Generated wrapper for the Web Awesome wa-divider component.
Generated from Web Awesome metadata.
Usage
wa_divider(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
lang = NULL,
orientation = 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. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-drawer component
Description
Generated wrapper for the Web Awesome wa-drawer 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_drawer(
input_id,
...,
class = NULL,
style = NULL,
label = NULL,
dir = NULL,
lang = NULL,
light_dismiss = NULL,
open = NULL,
placement = NULL,
with_footer = NULL,
without_header = NULL,
footer = NULL,
header_actions = NULL,
label_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
light_dismiss |
Boolean. Default: |
open |
Boolean. Default: |
placement |
Enumerated string. Allowed values: |
with_footer |
Boolean. Default: |
without_header |
Boolean. Default: |
footer |
The drawer's footer, usually one or more buttons representing various options. |
header_actions |
Optional actions to add to the header. Works best
with |
label_slot |
The drawer's label. Alternatively, you can use the
|
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.
Create a wa-dropdown component
Description
Generated wrapper for the Web Awesome wa-dropdown component. When
used as a Shiny input, action semantics are exposed through
input$<input_id> and the latest selected dropdown item value is
exposed through input$<input_id>_value. The action input increments
on every selection, including repeated selection of the same item. The
companion value input reflects the selected item's value, returns
NULL when the selected item has no value, and preserves an explicit
empty string "" when that is the selected item's value. Each
committed action publishes a numeric action value.
Generated from Web Awesome metadata.
Usage
wa_dropdown(
input_id,
...,
class = NULL,
style = NULL,
dir = NULL,
distance = NULL,
lang = NULL,
open = NULL,
placement = NULL,
size = NULL,
skidding = NULL,
trigger = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
dir |
String. Optional Web Awesome attribute. |
distance |
Number. Default: |
lang |
String. Optional Web Awesome attribute. |
open |
Boolean. Default: |
placement |
Enumerated string. Allowed values: |
size |
Enumerated string. Allowed values: |
skidding |
Number. Default: |
trigger |
The element that triggers the dropdown, such as a
|
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> uses action semantics and invalidates on each
committed action, including repeated selection of the same item. The
Shiny action value is returned as a numeric action value.
input$<input_id>_value reflects the latest selected item's value
value, returns NULL when the selected item has no value , and
preserves an explicit empty string "" when that is the selected
item's value. The payload value is returned as a character string or
NULL.
Create a wa-dropdown-item component
Description
Generated wrapper for the Web Awesome wa-dropdown-item component.
Generated from Web Awesome metadata.
Usage
wa_dropdown_item(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
checked = NULL,
disabled = NULL,
dir = NULL,
lang = NULL,
submenu_open = NULL,
type = NULL,
variant = NULL,
details = NULL,
icon = NULL,
submenu = 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. An optional value for the menu item. This is
useful for determining which item was selected when listening to the
dropdown's |
checked |
Boolean. Default: |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
submenu_open |
Boolean. Default: |
type |
Enumerated string. Allowed values: |
variant |
Enumerated string. Allowed values: |
details |
Additional content or details to display after the label. |
icon |
An optional icon to display before the label. |
submenu |
Submenu items, typically |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-format-bytes component
Description
Generated wrapper for the Web Awesome wa-format-bytes component.
Generated from Web Awesome metadata.
Usage
wa_format_bytes(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
dir = NULL,
display = NULL,
lang = NULL,
unit = 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 |
Number. Default: |
dir |
String. Optional Web Awesome attribute. |
display |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
unit |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-format-date component
Description
Generated wrapper for the Web Awesome wa-format-date component.
Generated from Web Awesome metadata.
Usage
wa_format_date(
...,
id = NULL,
class = NULL,
style = NULL,
date = NULL,
day = NULL,
dir = NULL,
era = NULL,
hour = NULL,
hour_format = NULL,
lang = NULL,
minute = NULL,
month = NULL,
second = NULL,
time_zone = NULL,
time_zone_name = NULL,
weekday = NULL,
year = 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. |
date |
Default: |
day |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
era |
Enumerated string. Allowed values: |
hour |
Enumerated string. Allowed values: |
hour_format |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
minute |
Enumerated string. Allowed values: |
month |
Enumerated string. Allowed values: |
second |
Enumerated string. Allowed values: |
time_zone |
String. The time zone to express the time in. |
time_zone_name |
Enumerated string. Allowed values: |
weekday |
Enumerated string. Allowed values: |
year |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-format-number component
Description
Generated wrapper for the Web Awesome wa-format-number component.
Generated from Web Awesome metadata.
Usage
wa_format_number(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
currency = NULL,
currency_display = NULL,
dir = NULL,
lang = NULL,
maximum_fraction_digits = NULL,
maximum_significant_digits = NULL,
minimum_fraction_digits = NULL,
minimum_integer_digits = NULL,
minimum_significant_digits = NULL,
type = NULL,
without_grouping = 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 |
Number. Default: |
currency |
String. Default: |
currency_display |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
maximum_fraction_digits |
Number. The maximum number of fraction digits to use. Possible values are 0-100. |
maximum_significant_digits |
Number. The maximum number of significant digits to use,. Possible values are 1-21. |
minimum_fraction_digits |
Number. The minimum number of fraction digits to use. Possible values are 0-100. |
minimum_integer_digits |
Number. The minimum number of integer digits to use. Possible values are 1-21. |
minimum_significant_digits |
Number. The minimum number of significant digits to use. Possible values are 1-21. |
type |
Enumerated string. Allowed values: |
without_grouping |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-icon component
Description
Generated wrapper for the Web Awesome wa-icon component.
Generated from Web Awesome metadata.
Usage
wa_icon(
...,
id = NULL,
class = NULL,
style = NULL,
label = NULL,
name = NULL,
animation = NULL,
auto_width = NULL,
dir = NULL,
family = NULL,
flip = NULL,
lang = NULL,
library = NULL,
rotate = NULL,
src = NULL,
swap_opacity = NULL,
variant = 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. |
label |
String. Default: |
name |
String. The name of the icon to draw. Available names depend on the icon library being used. |
animation |
Enumerated string. Allowed values: |
auto_width |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
family |
String. The family of icons to choose from. For Font
Awesome Free, valid options include |
flip |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
library |
String. Default: |
rotate |
Number. Default: |
src |
String. An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and can result in XSS attacks. |
swap_opacity |
Boolean. Default: |
variant |
String. The name of the icon's variant. For Font
Awesome, valid options include |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-include component
Description
Generated wrapper for the Web Awesome wa-include component.
Generated from Web Awesome metadata.
Usage
wa_include(
...,
id = NULL,
class = NULL,
style = NULL,
allow_scripts = NULL,
dir = NULL,
lang = NULL,
mode = NULL,
src = 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. |
allow_scripts |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
mode |
Enumerated string. Allowed values: |
src |
String. The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as code and can result in XSS attacks. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-input component
Description
Generated wrapper for the Web Awesome wa-input component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value.
Generated from Web Awesome metadata.
Generated update helper for the Web Awesome wa-input component.
Usage
wa_input(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
appearance = NULL,
autocapitalize = NULL,
autocomplete = NULL,
autocorrect = NULL,
autofocus = NULL,
custom_error = NULL,
dir = NULL,
enterkeyhint = NULL,
inputmode = NULL,
lang = NULL,
max = NULL,
maxlength = NULL,
min = NULL,
minlength = NULL,
password_toggle = NULL,
password_visible = NULL,
pattern = NULL,
pill = NULL,
placeholder = NULL,
readonly = NULL,
required = NULL,
size = NULL,
spellcheck = NULL,
step = NULL,
title = NULL,
type = NULL,
with_clear = NULL,
with_hint = NULL,
with_label = NULL,
without_spin_buttons = NULL,
clear_icon = NULL,
end = NULL,
hide_password_icon = NULL,
hint_slot = NULL,
label_slot = NULL,
show_password_icon = NULL,
start = NULL
)
update_wa_input(
session,
input_id,
value = NULL,
label = NULL,
hint = NULL,
disabled = NULL
)
Arguments
input_id |
Input id of the component to update. |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Optional value to send to the component. |
disabled |
Optional logical disabled state to send to the component. |
label |
Optional label text to send to the component. |
hint |
Optional hint text to send to the component. |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
autocapitalize |
Enumerated string. Allowed values: |
autocomplete |
String. Specifies what permission the browser has to provide assistance in filling out form field values. Refer to this page on MDN for available values. |
autocorrect |
Boolean. Default: |
autofocus |
Boolean. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
enterkeyhint |
Enumerated string. Allowed values: |
inputmode |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
max |
The input's maximum value. Only applies to date and number input types. |
maxlength |
Number. The maximum length of input that will be considered valid. |
min |
The input's minimum value. Only applies to date and number input types. |
minlength |
Number. The minimum length of input that will be considered valid. |
password_toggle |
Boolean. Default: |
password_visible |
Boolean. Default: |
pattern |
String. A regular expression pattern to validate input against. |
pill |
Boolean. Default: |
placeholder |
String. Default: |
readonly |
Boolean. Default: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
spellcheck |
Boolean. Default: |
step |
Specifies the granularity that the value must adhere to, or
the special value |
title |
String. Default: |
type |
Enumerated string. Allowed values: |
with_clear |
Boolean. Default: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
without_spin_buttons |
Boolean. Default: |
clear_icon |
An icon to use in lieu of the default clear icon. |
end |
An element, such as |
hide_password_icon |
An icon to use in lieu of the default hide password icon. |
hint_slot |
Text that describes how to use the input.
Alternatively, you can use the |
label_slot |
The input's label. Alternatively, you can use the
|
show_password_icon |
An icon to use in lieu of the default show password icon. |
start |
An element, such as |
session |
Shiny session object. |
Value
An HTML tag for the component.
Invisibly returns NULL.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Create a wa-intersection-observer component
Description
Generated wrapper for the Web Awesome wa-intersection-observer
component.
Generated from Web Awesome metadata.
Usage
wa_intersection_observer(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
intersect_class = NULL,
lang = NULL,
once = NULL,
root = NULL,
root_margin = NULL,
threshold = 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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
intersect_class |
String. Default: |
lang |
String. Optional Web Awesome attribute. |
once |
Boolean. Default: |
root |
String. Default: |
root_margin |
String. Default: |
threshold |
String. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Register a small JavaScript snippet with the page
Description
Adds one inline JavaScript snippet to the page and attaches the shiny.webawesome dependency.
Usage
wa_js(code)
Arguments
code |
One non-missing JavaScript string to inject into the page. |
Details
wa_js() is a small package-level helper for app-local browser glue that
should remain easy to see from the surrounding Shiny code. Typical uses
include listening for browser-side events, reading live component
properties, and publishing values back to Shiny with
Shiny.setInputValue().
A typical property-read pattern is:
find the browser element by DOM
idread the live property in JavaScript
publish the value with
Shiny.setInputValue()consume the published value in Shiny as an ordinary input
This helper is intentionally narrow. It accepts a scalar JavaScript string
and injects it into the rendered page. For larger or shared scripts, prefer
standard Shiny asset patterns such as www/ files and tags$script().
Value
A <script> tag with the shiny.webawesome dependency attached.
Examples
if (interactive()) {
ui <- webawesomePage(
wa_js("
function publishDetailsOpen() {
const details = document.getElementById('details');
if (!details ||
!window.Shiny ||
typeof window.Shiny.setInputValue !== 'function') {
return;
}
window.Shiny.setInputValue(
'details_open_state',
details.open,
{ priority: 'event' }
);
}
document.addEventListener('shiny:connected', publishDetailsOpen, {
once: true
});
document.addEventListener('wa-show', function(event) {
if (event.target.id === 'details') {
publishDetailsOpen();
}
});
document.addEventListener('wa-hide', function(event) {
if (event.target.id === 'details') {
publishDetailsOpen();
}
});
"),
wa_details(
input_id = "details",
summary = "More information",
"Details body"
),
shiny::verbatimTextOutput("details_state")
)
server <- function(input, output, session) {
output$details_state <- shiny::renderPrint({
input$details_open_state
})
}
shiny::shinyApp(ui, server)
}
if (interactive()) {
js_file <- tempfile(fileext = ".js")
writeLines(
c(
"document.addEventListener('wa-show', function(event) {",
" if (event.target.id !== 'details') {",
" return;",
" }",
"",
" if (window.Shiny &&",
" typeof window.Shiny.setInputValue === 'function') {",
" window.Shiny.setInputValue(",
" 'details_open_state',",
" event.target.open,",
" { priority: 'event' }",
" );",
" }",
"});"
),
js_file
)
js_code <- paste(readLines(js_file, warn = FALSE), collapse = "\n")
ui <- webawesomePage(
wa_js(js_code),
wa_details(
input_id = "details",
summary = "More information",
"Details body"
)
)
}
Create a wa-markdown component
Description
Generated wrapper for the Web Awesome wa-markdown component.
Generated from Web Awesome metadata.
Usage
wa_markdown(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
lang = NULL,
tab_size = 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. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
tab_size |
Number. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-mutation-observer component
Description
Generated wrapper for the Web Awesome wa-mutation-observer component.
Generated from Web Awesome metadata.
Usage
wa_mutation_observer(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
attr = NULL,
attr_old_value = NULL,
char_data = NULL,
char_data_old_value = NULL,
child_list = NULL,
dir = NULL,
lang = 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. |
disabled |
Boolean. Default: |
attr |
String. Watches for changes to attributes. To watch only
specific attributes, separate them by a space, e.g. |
attr_old_value |
Boolean. Default: |
char_data |
Boolean. Default: |
char_data_old_value |
Boolean. Default: |
child_list |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-number-input component
Description
Generated wrapper for the Web Awesome wa-number-input component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value.
Generated from Web Awesome metadata.
Generated update helper for the Web Awesome wa-number-input component.
Usage
wa_number_input(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
appearance = NULL,
autocomplete = NULL,
autofocus = NULL,
custom_error = NULL,
dir = NULL,
enterkeyhint = NULL,
inputmode = NULL,
lang = NULL,
max = NULL,
min = NULL,
pill = NULL,
placeholder = NULL,
readonly = NULL,
required = NULL,
size = NULL,
step = NULL,
title = NULL,
with_hint = NULL,
with_label = NULL,
without_steppers = NULL,
decrement_icon = NULL,
end = NULL,
hint_slot = NULL,
increment_icon = NULL,
label_slot = NULL,
start = NULL
)
update_wa_number_input(
session,
input_id,
value = NULL,
label = NULL,
hint = NULL,
disabled = NULL
)
Arguments
input_id |
Input id of the component to update. |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Optional value to send to the component. |
disabled |
Optional logical disabled state to send to the component. |
label |
Optional label text to send to the component. |
hint |
Optional hint text to send to the component. |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
autocomplete |
String. Specifies what permission the browser has to provide assistance in filling out form field values. Refer to this page on MDN for available values. |
autofocus |
Boolean. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
enterkeyhint |
Enumerated string. Allowed values: |
inputmode |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
max |
Number. The input's maximum value. |
min |
Number. The input's minimum value. |
pill |
Boolean. Default: |
placeholder |
String. Default: |
readonly |
Boolean. Default: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
step |
Default: |
title |
String. Default: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
without_steppers |
Boolean. Default: |
decrement_icon |
An icon to use in lieu of the default decrement icon. |
end |
An element, such as |
hint_slot |
Text that describes how to use the input.
Alternatively, you can use the |
increment_icon |
An icon to use in lieu of the default increment icon. |
label_slot |
The input's label. Alternatively, you can use the
|
start |
An element, such as |
session |
Shiny session object. |
Value
An HTML tag for the component.
Invisibly returns NULL.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Create a wa-option component
Description
Generated wrapper for the Web Awesome wa-option component.
Generated from Web Awesome metadata.
Usage
wa_option(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
dir = NULL,
lang = NULL,
selected = NULL,
end = NULL,
start = 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: |
disabled |
Boolean. Default: |
label |
String. The option’s plain text label. Usually automatically generated, but can be useful to provide manually for cases involving complex content. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
selected |
Boolean. Default: |
end |
An element, such as |
start |
An element, such as |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-page component
Description
Generated wrapper for the Web Awesome wa-page component.
Generated from Web Awesome metadata.
Usage
wa_page(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
disable_navigation_toggle = NULL,
lang = NULL,
mobile_breakpoint = NULL,
nav_open = NULL,
navigation_placement = NULL,
view = NULL,
aside = NULL,
banner = NULL,
footer = NULL,
header = NULL,
main_footer = NULL,
main_header = NULL,
menu = NULL,
navigation = NULL,
navigation_footer = NULL,
navigation_header = NULL,
navigation_toggle = NULL,
navigation_toggle_icon = NULL,
skip_to_content = NULL,
subheader = 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. |
dir |
String. Optional Web Awesome attribute. |
disable_navigation_toggle |
Boolean. Default: |
lang |
String. Optional Web Awesome attribute. |
mobile_breakpoint |
String. Default: |
nav_open |
Boolean. Default: |
navigation_placement |
Enumerated string. Allowed values: |
view |
Enumerated string. Allowed values: |
aside |
Content to be shown on the right side of the page. Typically contains a table of contents, ads, etc. This section "sticks" to the top as the page scrolls. |
banner |
The banner that gets display above the header. The banner will not be shown if no content is provided. |
footer |
The content to display in the footer. This is always displayed underneath the viewport so will always make the page "scrollable". |
header |
The header to display at the top of the page. If a banner is present, the header will appear below the banner. The header will not be shown if there is no content. |
main_footer |
Footer to display inline below the main content. |
main_header |
Header to display inline above the main content. |
menu |
The left side of the page. If you slot an element in here,
you will override the default |
navigation |
The main content to display in the navigation area.
This is displayed on the left side of the page, if |
navigation_footer |
The footer for a navigation area. On mobile
this will be the footer for |
navigation_header |
The header for a navigation area. On mobile
this will be the header for |
navigation_toggle |
Use this slot to slot in your own button +
icon for toggling the navigation drawer. By default it is a
|
navigation_toggle_icon |
Use this to slot in your own icon for
toggling the navigation drawer. By default it is 3 bars |
skip_to_content |
The "skip to content" slot. You can override
this If you would like to override the |
subheader |
A subheader to display below the |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-popover component
Description
Generated wrapper for the Web Awesome wa-popover component.
Generated from Web Awesome metadata.
Usage
wa_popover(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
distance = NULL,
`for` = NULL,
lang = NULL,
open = NULL,
placement = NULL,
skidding = NULL,
without_arrow = 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. |
dir |
String. Optional Web Awesome attribute. |
distance |
Number. Default: |
for |
String. Default: |
lang |
String. Optional Web Awesome attribute. |
open |
Boolean. Default: |
placement |
Enumerated string. Allowed values: |
skidding |
Number. Default: |
without_arrow |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-popup component
Description
Generated wrapper for the Web Awesome wa-popup component.
Generated from Web Awesome metadata.
Usage
wa_popup(
...,
id = NULL,
class = NULL,
style = NULL,
active = NULL,
anchor = NULL,
arrow = NULL,
arrow_padding = NULL,
arrow_placement = NULL,
auto_size = NULL,
auto_size_padding = NULL,
auto_size_boundary = NULL,
boundary = NULL,
dir = NULL,
distance = NULL,
flip = NULL,
flip_fallback_placements = NULL,
flip_fallback_strategy = NULL,
flip_padding = NULL,
flip_boundary = NULL,
hover_bridge = NULL,
lang = NULL,
placement = NULL,
shift = NULL,
shift_padding = NULL,
shift_boundary = NULL,
skidding = NULL,
sync = NULL,
anchor_slot = 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. |
active |
Boolean. Default: |
anchor |
The element the popup will be anchored to. If the anchor
lives outside of the popup, you can provide the anchor element |
arrow |
Boolean. Default: |
arrow_padding |
Number. Default: |
arrow_placement |
Enumerated string. Allowed values: |
auto_size |
Enumerated string. Allowed values: |
auto_size_padding |
Number. Default: |
auto_size_boundary |
The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can change the boundary by passing a reference to one or more elements to this property. |
boundary |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
distance |
Number. Default: |
flip |
Boolean. Default: |
flip_fallback_placements |
String. Default: |
flip_fallback_strategy |
Enumerated string. Allowed values:
|
flip_padding |
Number. Default: |
flip_boundary |
The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can change the boundary by passing a reference to one or more elements to this property. |
hover_bridge |
Boolean. Default: |
lang |
String. Optional Web Awesome attribute. |
placement |
Enumerated string. Allowed values: |
shift |
Boolean. Default: |
shift_padding |
Number. Default: |
shift_boundary |
The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can change the boundary by passing a reference to one or more elements to this property. |
skidding |
Number. Default: |
sync |
Enumerated string. Allowed values: |
anchor_slot |
The element the popup will be anchored to. If the
anchor lives outside of the popup, you can use the |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-progress-bar component
Description
Generated wrapper for the Web Awesome wa-progress-bar component.
Generated from Web Awesome metadata.
Usage
wa_progress_bar(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
label = NULL,
dir = NULL,
indeterminate = NULL,
lang = 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 |
Number. Default: |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
indeterminate |
Boolean. Default: |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-progress-ring component
Description
Generated wrapper for the Web Awesome wa-progress-ring component.
Generated from Web Awesome metadata.
Usage
wa_progress_ring(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
label = NULL,
dir = NULL,
lang = 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 |
Number. Default: |
label |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-qr-code component
Description
Generated wrapper for the Web Awesome wa-qr-code component.
Generated from Web Awesome metadata.
Usage
wa_qr_code(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
label = NULL,
background = NULL,
dir = NULL,
error_correction = NULL,
fill = NULL,
lang = NULL,
radius = NULL,
size = 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: |
label |
String. Default: |
background |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
error_correction |
Enumerated string. Allowed values: |
fill |
String. Default: |
lang |
String. Optional Web Awesome attribute. |
radius |
Number. Default: |
size |
Number. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-radio component
Description
Generated wrapper for the Web Awesome wa-radio component.
Generated from Web Awesome metadata.
Usage
wa_radio(
...,
id = NULL,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
name = NULL,
appearance = NULL,
custom_error = NULL,
dir = NULL,
lang = NULL,
size = 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. The radio's value. When selected, the radio group will receive this value. |
disabled |
Boolean. Default: |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
size |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-radio-group component
Description
Generated wrapper for the Web Awesome wa-radio-group component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value.
Generated from Web Awesome metadata.
Usage
wa_radio_group(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
custom_error = NULL,
dir = NULL,
lang = NULL,
orientation = NULL,
required = NULL,
size = NULL,
with_hint = NULL,
with_label = NULL,
hint_slot = NULL,
label_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
String. The default value of the form control. Primarily
used for resetting the form control. This wrapper argument sets the
HTML |
disabled |
Boolean. Default: |
label |
String. Default: |
hint |
String. Default: |
name |
String. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
hint_slot |
Text that describes how to use the radio group.
Alternatively, you can use the |
label_slot |
The radio group's label. Required for proper
accessibility. Alternatively, you can use the |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Create a wa-rating component
Description
Generated wrapper for the Web Awesome wa-rating component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value. The Shiny value is returned as a numeric value.
Generated from Web Awesome metadata.
Usage
wa_rating(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
name = NULL,
custom_error = NULL,
default_value = NULL,
dir = NULL,
get_symbol = NULL,
lang = NULL,
max = NULL,
precision = NULL,
readonly = NULL,
required = NULL,
size = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Number. Default: |
disabled |
Boolean. Default: |
label |
String. Default: |
name |
String. Default: |
custom_error |
String. Default: |
default_value |
Number. Default: |
dir |
String. Optional Web Awesome attribute. |
get_symbol |
A function that customizes the symbol to be rendered.
The first and only argument is the rating's current value. The function
should return a string containing trusted HTML of the symbol to render
at the specified value. Works well with |
lang |
String. Optional Web Awesome attribute. |
max |
Number. Default: |
precision |
Number. Default: |
readonly |
Boolean. Default: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value. The
Shiny value is returned as a numeric value.
Create a wa-relative-time component
Description
Generated wrapper for the Web Awesome wa-relative-time component.
Generated from Web Awesome metadata.
Usage
wa_relative_time(
...,
id = NULL,
class = NULL,
style = NULL,
date = NULL,
dir = NULL,
format = NULL,
lang = NULL,
numeric = NULL,
sync = 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. |
date |
Default: |
dir |
String. Optional Web Awesome attribute. |
format |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
numeric |
Enumerated string. Allowed values: |
sync |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-resize-observer component
Description
Generated wrapper for the Web Awesome wa-resize-observer component.
Generated from Web Awesome metadata.
Usage
wa_resize_observer(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
lang = 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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-scroller component
Description
Generated wrapper for the Web Awesome wa-scroller component.
Generated from Web Awesome metadata.
Usage
wa_scroller(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
lang = NULL,
orientation = NULL,
without_scrollbar = NULL,
without_shadow = 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. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
without_scrollbar |
Boolean. Default: |
without_shadow |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-select component
Description
Generated wrapper for the Web Awesome wa-select component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value. The Shiny value is returned as a character string for
single-select usage, or a character vector when multiple is TRUE.
Generated from Web Awesome metadata.
Generated update helper for the Web Awesome wa-select component.
Usage
wa_select(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
appearance = NULL,
custom_error = NULL,
dir = NULL,
lang = NULL,
max_options_visible = NULL,
multiple = NULL,
open = NULL,
pill = NULL,
placeholder = NULL,
placement = NULL,
required = NULL,
size = NULL,
with_clear = NULL,
with_hint = NULL,
with_label = NULL,
clear_icon = NULL,
end = NULL,
expand_icon = NULL,
hint_slot = NULL,
label_slot = NULL,
start = NULL
)
update_wa_select(
session,
input_id,
value = NULL,
label = NULL,
hint = NULL,
disabled = NULL
)
Arguments
input_id |
Input id of the component to update. |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Optional value to send to the component. |
disabled |
Optional logical disabled state to send to the component. |
label |
Optional label text to send to the component. |
hint |
Optional hint text to send to the component. |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
max_options_visible |
Number. Default: |
multiple |
Boolean. Default: |
open |
Boolean. Default: |
pill |
Boolean. Default: |
placeholder |
String. Default: |
placement |
Enumerated string. Allowed values: |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
with_clear |
Boolean. Default: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
clear_icon |
An icon to use in lieu of the default clear icon. |
end |
An element, such as |
expand_icon |
The icon to show when the control is expanded and collapsed. Rotates on open and close. |
hint_slot |
Text that describes how to use the input.
Alternatively, you can use the |
label_slot |
The input's label. Alternatively, you can use the
|
start |
An element, such as |
session |
Shiny session object. |
Value
An HTML tag for the component.
Invisibly returns NULL.
Shiny Bindings
input$<input_id> reflects the component's current value value. The
Shiny value is returned as a character string for single-select usage,
or a character vector when multiple is TRUE.
Set one live property on a browser-side element
Description
Sends a one-way command from the Shiny server that sets a live browser-side
property on the element identified by DOM id.
Usage
wa_set_property(
id,
property,
value,
session = shiny::getDefaultReactiveDomain()
)
Arguments
id |
DOM |
property |
Scalar property name to assign on the target element. |
value |
Value to assign. This should be serializable through Shiny's
custom-message transport. In practice, prefer JSON-like values such as
strings, numbers, logicals, |
session |
Shiny session object. Defaults to the current reactive domain. |
Details
wa_set_property() is a narrow package-level escape hatch for advanced
cases where a Web Awesome component property needs to be updated from server
logic but is not covered by a generated update helper. It does not validate
whether the requested property exists for the targeted component.
This helper is complementary to generated component bindings and update helpers. It is not part of upstream component coverage and does not expand the generated per-component API surface.
On the server side, wa_set_property() validates only its R helper inputs,
such as the target id, property name, and session. It does not validate
whether the requested property exists on the browser-side element.
In the browser runtime, the command layer validates that the target DOM
id resolves to an element and that a property name was supplied, then
assigns the value directly. Command-layer warnings are controlled by the
package warning registry, especially the command_layer key. For option
details, see the Package Options article.
Value
Invisibly returns NULL.
Examples
library(shiny)
library(shiny.webawesome)
ui <- webawesomePage(
wa_button("Open dialog", id = "open_dialog"),
wa_dialog("Dialog body", id = "dialog")
)
server <- function(input, output, session) {
observeEvent(input$open_dialog, {
wa_set_property("dialog", "open", TRUE, session = session)
})
}
app <- shinyApp(ui, server)
stopifnot(inherits(app, "shiny.appobj"))
# Run `app` interactively to launch this example application.
Create a wa-skeleton component
Description
Generated wrapper for the Web Awesome wa-skeleton component.
Generated from Web Awesome metadata.
Usage
wa_skeleton(
...,
id = NULL,
class = NULL,
style = NULL,
dir = NULL,
effect = NULL,
lang = 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. |
dir |
String. Optional Web Awesome attribute. |
effect |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-slider component
Description
Generated wrapper for the Web Awesome wa-slider component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value. The Shiny value is returned as a numeric value.
Generated from Web Awesome metadata.
Generated update helper for the Web Awesome wa-slider component.
Usage
wa_slider(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
autofocus = NULL,
custom_error = NULL,
dir = NULL,
indicator_offset = NULL,
lang = NULL,
max = NULL,
max_value = NULL,
min = NULL,
min_value = NULL,
orientation = NULL,
range = NULL,
readonly = NULL,
size = NULL,
step = NULL,
tooltip_distance = NULL,
tooltip_placement = NULL,
with_hint = NULL,
with_label = NULL,
with_markers = NULL,
with_tooltip = NULL,
hint_slot = NULL,
label_slot = NULL,
reference = NULL
)
update_wa_slider(
session,
input_id,
value = NULL,
label = NULL,
hint = NULL,
disabled = NULL
)
Arguments
input_id |
Input id of the component to update. |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Optional value to send to the component. |
disabled |
Optional logical disabled state to send to the component. |
label |
Optional label text to send to the component. |
hint |
Optional hint text to send to the component. |
name |
String. Default: |
autofocus |
Boolean. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
indicator_offset |
Number. The starting value from which to draw the slider's fill, which is based on its current value. |
lang |
String. Optional Web Awesome attribute. |
max |
Number. Default: |
max_value |
Number. Default: |
min |
Number. Default: |
min_value |
Number. Default: |
orientation |
Enumerated string. Allowed values: |
range |
Boolean. Default: |
readonly |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
step |
Number. Default: |
tooltip_distance |
Number. Default: |
tooltip_placement |
Enumerated string. Allowed values: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
with_markers |
Boolean. Default: |
with_tooltip |
Boolean. Default: |
hint_slot |
Text that describes how to use the input.
Alternatively, you can use the |
label_slot |
The slider label. Alternatively, you can use the
|
reference |
One or more reference labels to show visually below the slider. |
session |
Shiny session object. |
Value
An HTML tag for the component.
Invisibly returns NULL.
Shiny Bindings
input$<input_id> reflects the component's current value value. The
Shiny value is returned as a numeric value.
Create a wa-spinner component
Description
Generated wrapper for the Web Awesome wa-spinner component.
Generated from Web Awesome metadata.
Usage
wa_spinner(..., id = NULL, class = NULL, style = NULL, dir = NULL, lang = 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. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-split-panel component
Description
Generated wrapper for the Web Awesome wa-split-panel component.
Generated from Web Awesome metadata.
Usage
wa_split_panel(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
lang = NULL,
orientation = NULL,
position = NULL,
position_in_pixels = NULL,
primary = NULL,
snap = NULL,
snap_threshold = NULL,
divider = NULL,
end = NULL,
start = 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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
orientation |
Enumerated string. Allowed values: |
position |
Number. Default: |
position_in_pixels |
Number. The current position of the divider from the primary panel's edge in pixels. |
primary |
Enumerated string. Allowed values: |
snap |
String. One or more space-separated values at which the
divider should snap. Values can be in pixels or percentages, e.g.
|
snap_threshold |
Number. Default: |
divider |
The divider. Useful for slotting in a custom icon that renders as a handle. |
end |
Content to place in the end panel. |
start |
Content to place in the start panel. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-switch component
Description
Generated wrapper for the Web Awesome wa-switch component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value. The Shiny value is returned as a logical value.
Generated from Web Awesome metadata.
Usage
wa_switch(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
checked = NULL,
disabled = NULL,
hint = NULL,
name = NULL,
custom_error = NULL,
dir = NULL,
lang = NULL,
required = NULL,
size = NULL,
title = NULL,
with_hint = NULL,
hint_slot = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
String. The value of the switch, submitted as a name/value pair with form data. |
checked |
Boolean. Default: |
disabled |
Boolean. Default: |
hint |
String. Default: |
name |
String. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
required |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
title |
String. Default: |
with_hint |
Boolean. Default: |
hint_slot |
Text that describes how to use the switch.
Alternatively, you can use the |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current value value. The
Shiny value is returned as a logical value.
Create a wa-tab component
Description
Generated wrapper for the Web Awesome wa-tab component.
Generated from Web Awesome metadata.
Usage
wa_tab(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
lang = NULL,
panel = 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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
panel |
String. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-tab-group component
Description
Generated wrapper for the Web Awesome wa-tab-group component. When
used as a Shiny input, input$<input_id> reflects the component's
current semantic active state. The Shiny value is returned as a
character string.
Generated from Web Awesome metadata.
Usage
wa_tab_group(
input_id,
...,
class = NULL,
style = NULL,
activation = NULL,
active = NULL,
dir = NULL,
lang = NULL,
placement = NULL,
without_scroll_controls = NULL,
nav = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
activation |
Enumerated string. Allowed values: |
active |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
placement |
Enumerated string. Allowed values: |
without_scroll_controls |
Boolean. Default: |
nav |
Used for grouping tabs in the tab group. Must be |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current semantic active
state. The Shiny value is returned as a character string.
Create a wa-tab-panel component
Description
Generated wrapper for the Web Awesome wa-tab-panel component.
Generated from Web Awesome metadata.
Usage
wa_tab_panel(
...,
id = NULL,
class = NULL,
style = NULL,
name = NULL,
active = NULL,
dir = NULL,
lang = 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. |
name |
String. Default: |
active |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-tag component
Description
Generated wrapper for the Web Awesome wa-tag component.
Generated from Web Awesome metadata.
Usage
wa_tag(
...,
id = NULL,
class = NULL,
style = NULL,
appearance = NULL,
dir = NULL,
lang = NULL,
pill = NULL,
size = NULL,
variant = NULL,
with_remove = 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. |
appearance |
Enumerated string. Allowed values: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
pill |
Boolean. Default: |
size |
Enumerated string. Allowed values: |
variant |
Enumerated string. Allowed values: |
with_remove |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-textarea component
Description
Generated wrapper for the Web Awesome wa-textarea component. When
used as a Shiny input, input$<input_id> reflects the component's
current value value.
Generated from Web Awesome metadata.
Generated update helper for the Web Awesome wa-textarea component.
Usage
wa_textarea(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
disabled = NULL,
label = NULL,
hint = NULL,
name = NULL,
appearance = NULL,
autocapitalize = NULL,
autocomplete = NULL,
autocorrect = NULL,
autofocus = NULL,
custom_error = NULL,
dir = NULL,
enterkeyhint = NULL,
inputmode = NULL,
lang = NULL,
maxlength = NULL,
minlength = NULL,
placeholder = NULL,
readonly = NULL,
required = NULL,
resize = NULL,
rows = NULL,
size = NULL,
spellcheck = NULL,
title = NULL,
with_count = NULL,
with_hint = NULL,
with_label = NULL,
hint_slot = NULL,
label_slot = NULL
)
update_wa_textarea(
session,
input_id,
value = NULL,
label = NULL,
hint = NULL,
disabled = NULL
)
Arguments
input_id |
Input id of the component to update. |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
value |
Optional value to send to the component. |
disabled |
Optional logical disabled state to send to the component. |
label |
Optional label text to send to the component. |
hint |
Optional hint text to send to the component. |
name |
String. Default: |
appearance |
Enumerated string. Allowed values: |
autocapitalize |
Enumerated string. Allowed values: |
autocomplete |
String. Specifies what permission the browser has to provide assistance in filling out form field values. Refer to this page on MDN for available values. |
autocorrect |
Boolean. Default: |
autofocus |
Boolean. Default: |
custom_error |
String. Default: |
dir |
String. Optional Web Awesome attribute. |
enterkeyhint |
Enumerated string. Allowed values: |
inputmode |
Enumerated string. Allowed values: |
lang |
String. Optional Web Awesome attribute. |
maxlength |
Number. The maximum length of input that will be considered valid. |
minlength |
Number. The minimum length of input that will be considered valid. |
placeholder |
String. Default: |
readonly |
Boolean. Default: |
required |
Boolean. Default: |
resize |
Enumerated string. Allowed values: |
rows |
Number. Default: |
size |
Enumerated string. Allowed values: |
spellcheck |
Boolean. Default: |
title |
String. Default: |
with_count |
Boolean. Default: |
with_hint |
Boolean. Default: |
with_label |
Boolean. Default: |
hint_slot |
Text that describes how to use the input.
Alternatively, you can use the |
label_slot |
The textarea's label. Alternatively, you can use the
|
session |
Shiny session object. |
Value
An HTML tag for the component.
Invisibly returns NULL.
Shiny Bindings
input$<input_id> reflects the component's current value value.
Create a wa-tooltip component
Description
Generated wrapper for the Web Awesome wa-tooltip component.
Generated from Web Awesome metadata.
Usage
wa_tooltip(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
distance = NULL,
`for` = NULL,
hide_delay = NULL,
lang = NULL,
open = NULL,
placement = NULL,
show_delay = NULL,
skidding = NULL,
trigger = NULL,
without_arrow = 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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
distance |
Number. Default: |
for |
String. Default: |
hide_delay |
Number. Default: |
lang |
String. Optional Web Awesome attribute. |
open |
Boolean. Default: |
placement |
Enumerated string. Allowed values: |
show_delay |
Number. Default: |
skidding |
Number. Default: |
trigger |
String. Default: |
without_arrow |
Boolean. Default: |
Value
An HTML tag for the component.
Shiny Bindings
None.
Create a wa-tree component
Description
Generated wrapper for the Web Awesome wa-tree component. When used as
a Shiny input, input$<input_id> reflects the component's current
semantic selectedItemIds state. The Shiny value is returned as a
character vector. For stable Shiny selection values, selectable
descendant wa-tree-item elements should have DOM id attributes.
Generated from Web Awesome metadata.
Usage
wa_tree(
input_id,
...,
class = NULL,
style = NULL,
dir = NULL,
lang = NULL,
selection = NULL,
collapse_icon = NULL,
expand_icon = NULL
)
Arguments
input_id |
Shiny input id for the component. This is also used as
the rendered DOM |
... |
Child content for the component's default slot. |
class |
Optional CSS class string. |
style |
Optional inline CSS style string. |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
selection |
Enumerated string. Allowed values: |
collapse_icon |
The icon to show when the tree item is collapsed.
Works best with |
expand_icon |
The icon to show when the tree item is expanded.
Works best with |
Value
An HTML tag for the component.
Shiny Bindings
input$<input_id> reflects the component's current semantic
selectedItemIds state. The Shiny value is returned as a character
vector.
Create a wa-tree-item component
Description
Generated wrapper for the Web Awesome wa-tree-item component.
Generated from Web Awesome metadata.
Usage
wa_tree_item(
...,
id = NULL,
class = NULL,
style = NULL,
disabled = NULL,
dir = NULL,
expanded = NULL,
lang = NULL,
lazy = NULL,
selected = NULL,
collapse_icon = NULL,
expand_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. |
disabled |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
expanded |
Boolean. Default: |
lang |
String. Optional Web Awesome attribute. |
lazy |
Boolean. Default: |
selected |
Boolean. Default: |
collapse_icon |
The icon to show when the tree item is collapsed. |
expand_icon |
The icon to show when the tree item is expanded. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Return the bundled Web Awesome version
Description
Reports the Web Awesome version bundled with the current
shiny.webawesome installation.
Usage
wa_version()
Value
A length-1 character vector containing the bundled Web Awesome version string.
Examples
wa_version()
Create a wa-zoomable-frame component
Description
Generated wrapper for the Web Awesome wa-zoomable-frame component.
Generated from Web Awesome metadata.
Usage
wa_zoomable_frame(
...,
id = NULL,
class = NULL,
style = NULL,
allowfullscreen = NULL,
dir = NULL,
lang = NULL,
loading = NULL,
referrerpolicy = NULL,
sandbox = NULL,
src = NULL,
srcdoc = NULL,
with_theme_sync = NULL,
without_controls = NULL,
without_interaction = NULL,
zoom = NULL,
zoom_levels = NULL,
zoom_in_icon = NULL,
zoom_out_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. |
allowfullscreen |
Boolean. Default: |
dir |
String. Optional Web Awesome attribute. |
lang |
String. Optional Web Awesome attribute. |
loading |
Enumerated string. Allowed values: |
referrerpolicy |
String. Controls referrer information. |
sandbox |
String. Security restrictions for the iframe. |
src |
String. The URL of the content to display. |
srcdoc |
String. Inline HTML to display. |
with_theme_sync |
Boolean. Default: |
without_controls |
Boolean. Default: |
without_interaction |
Boolean. Default: |
zoom |
Number. Default: |
zoom_levels |
String. Default: |
zoom_in_icon |
The slot that contains the zoom in icon. |
zoom_out_icon |
The slot that contains the zoom out icon. |
Value
An HTML tag for the component.
Shiny Bindings
None.
Construct a shiny.webawesome page
Description
Creates a minimal full-page HTML scaffold for Shiny applications that use
Web Awesome components. webawesomePage() attaches the package dependency
once at page level and temporarily suppresses duplicate wrapper-level
attachment while evaluating its children. This function serves an entirely
different role from the upstream component wa_page().
Usage
webawesomePage(..., title = NULL, lang = NULL, class = NULL, body_class = NULL)
Arguments
... |
UI content to place in the page body. |
title |
Optional page title. |
lang |
Optional HTML |
class |
Optional CSS class string for the root HTML element. This is
useful for page-level Web Awesome theme, palette, and brand classes such
as |
body_class |
Optional CSS class string for the page body. This is useful for app-shell layout or body-level styling hooks that should stay separate from root HTML theme classes. |
Details
This is a package-level Shiny helper that follows Shiny's page-helper model
(fluidPage(), etc.) for
dependency attachment and full-page scaffolding.
It is intentionally separate from the upstream wa-page component wrapper.
Value
An HTML page scaffold with the shiny.webawesome dependency attached.
Examples
if (interactive()) {
webawesomePage(
title = "shiny.webawesome",
class = "wa-theme-default wa-palette-default wa-brand-blue",
wa_card("Hello from Web Awesome")
)
}