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
idattribute.- ...
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
hrefis present.- disabled
Boolean. Default:
FALSE. Disables the button.- name
String. Default:
null. The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter. This attribute is ignored whenhrefis present.- appearance
Enumerated string. Allowed values:
accent,filled,filled-outlined,outlined,plain. Default:accent. The button's visual appearance.- custom_error
String. Default:
null. Optional Web Awesome attribute.- dir
String. Optional Web Awesome attribute.
- download
String. Tells the browser to download the linked file as this filename. Only used when
hrefis present.- formaction
String. Used to override the form owner's
actionattribute. This wrapper argument sets the HTMLformactionattribute, which maps to the component'sformActionfield/property.- formenctype
Enumerated string. Allowed values:
application/x-www-form-urlencoded,multipart/form-data,text/plain. Used to override the form owner'senctypeattribute. This wrapper argument sets the HTMLformenctypeattribute, which maps to the component'sformEnctypefield/property.- formmethod
Enumerated string. Allowed values:
get,post. Used to override the form owner'smethodattribute. This wrapper argument sets the HTMLformmethodattribute, which maps to the component'sformMethodfield/property.- formnovalidate
Boolean. Default:
FALSE. Used to override the form owner'snovalidateattribute. This wrapper argument sets the HTMLformnovalidateattribute, which maps to the component'sformNoValidatefield/property.- formtarget
Used to override the form owner's
targetattribute. This wrapper argument sets the HTMLformtargetattribute, which maps to the component'sformTargetfield/property.- href
String. When set, the underlying button will be rendered as an
<a>with thishrefinstead of a<button>.- lang
String. Optional Web Awesome attribute.
- loading
Boolean. Default:
FALSE. Draws the button in a loading state.- pill
Boolean. Default:
FALSE. Draws a pill-style button with rounded edges.- rel
String. When using
href, this attribute will map to the underlying link'srelattribute.- size
Enumerated string. Allowed values:
large,medium,small. Default:medium. The button's size.- target
Enumerated string. Allowed values:
_blank,_parent,_self,_top. Tells the browser where to open the link. Only used whenhrefis present.- title
String. Default:
"". Optional Web Awesome attribute.- type
Enumerated string. Allowed values:
button,reset,submit. Default:button. The type of button. Note that the default value isbuttoninstead ofsubmit, which is opposite of how native<button>elements behave. When the type issubmit, the button will submit the surrounding form.- variant
Enumerated string. Allowed values:
brand,danger,neutral,success,warning. Default:neutral. The button's theme variant. Defaults toneutralif not within another element with a variant.- with_caret
Boolean. Default:
FALSE. Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.- with_end
Boolean. Default:
FALSE. Only required for SSR. Set toTRUEif you're slotting in anendelement so the server-rendered markup includes the end slot before the component hydrates on the client.- with_start
Boolean. Default:
FALSE. Only required for SSR. Set toTRUEif you're slotting in astartelement so the server-rendered markup includes the start slot before the component hydrates on the client.- end
An element, such as
<wa-icon>, placed after the label.- start
An element, such as
<wa-icon>, placed before the label.