as_badge {shidashi} | R Documentation |
Generates badge icons
Description
Usually used along with card
,
card2
, and card_tabset
. See tools
parameters in these functions accordingly.
Usage
as_badge(badge = NULL)
Arguments
badge |
characters, |
Details
When badge
is NULL
or empty, then as_badge
returns empty strings. When badge
is a "shiny.tag"
object,
then 'HTML' class 'right'
and 'badge'
will be appended.
When badge
is a string, it should follow the syntax of
"message|class"
. The text before "|"
will be the badge
message, and the text after the "|"
becomes the class string.
Value
'HTML' tags
Examples
# Basic usage
as_badge("New")
# Add class `bg-red` and `no-padding`
as_badge("New|bg-red no-padding")
[Package shidashi version 0.1.6 Index]