| Title: | Bindings to the Calcite Design System 'JavaScript' Component Library |
| Version: | 1.0.0 |
| Description: | Provides access to the 'Calcite Design System' 'javascript' components via integration with the 'htmltools' and 'shiny' packages. Pre-built and interactive components can be used to generate either static html or interactive web applications. Learn more about the 'Calcite Design System' at https://developers.arcgis.com/calcite-design-system/. |
| License: | Apache License (≥ 2) |
| Imports: | cli, htmltools, rlang, shiny, utils, yyjsonr |
| Suggests: | brio, rstudioapi |
| URL: | https://r.esri.com/calcite/ |
| Encoding: | UTF-8 |
| Language: | en |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | yes |
| Packaged: | 2026-03-02 19:57:28 UTC; josiahparry |
| Author: | Josiah Parry |
| Maintainer: | Josiah Parry <josiah.parry@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-03 10:00:20 UTC |
calcite: Bindings to the Calcite Design System 'JavaScript' Component Library
Description
Provides access to the 'Calcite Design System' 'javascript' components via integration with the 'htmltools' and 'shiny' packages. Pre-built and interactive components can be used to generate either static html or interactive web applications. Learn more about the 'Calcite Design System' at https://developers.arcgis.com/calcite-design-system/.
Author(s)
Maintainer: Josiah Parry josiah.parry@gmail.com (ORCID)
See Also
Useful links:
Create a Calcite Accordion Component
Description
Accordions are most often used for hiding and showing sections of related content. They can have different selection modes, allowing users to have multiple or single accordion item(s) open.
Usage
calcite_accordion(
...,
id = NULL,
appearance = NULL,
icon_position = NULL,
icon_type = NULL,
scale = NULL,
selection_mode = NULL
)
Arguments
... |
One or more |
id |
Component ID (required for Shiny reactivity) |
appearance |
Visual style: "solid" or "transparent" (default: "solid") |
icon_position |
Placement of the icon in the header: "start" or "end" (default: "end") |
icon_type |
Type of icon in the header: "chevron", "caret", or "plus-minus" (default: "chevron") |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
selection_mode |
Selection mode: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection (default: "multiple") |
Details
Usage
To organize related text-based content.
To shorten pages and reduce scrolling when content is not crucial to read in full.
Best practices
Use Accordion to contain related but distinct, primarily text-based content.
Use Accordion within the main content area of an application to save space.
Avoid using Accordion within a Panel. Instead, use one or more Block(s).
Avoid using Accordion to house interactive controls or form-based components.
Shiny Integration
The accordion tracks which items are expanded based on its selection mode.
Available properties in input$id:
-
$appearance- The visual style -
$iconPosition- Icon placement -
$iconType- Icon type -
$scale- Size -
$selectionMode- Selection mode
Value
An object of class calcite_component
References
Examples
# Basic accordion with multiple selection
calcite_accordion(
id = "my_accordion",
calcite_accordion_item(
heading = "Watercraft",
description = "Yachts, boats, and dinghies",
icon_start = "embark",
"Recommended for coastal use"
),
calcite_accordion_item(
heading = "Automobiles",
description = "Cars, trucks, and buses",
icon_start = "car",
"A good choice for inland adventure"
)
)
# Single selection accordion
calcite_accordion(
selection_mode = "single",
appearance = "transparent",
icon_type = "plus-minus",
calcite_accordion_item(
heading = "Section 1",
"Content 1"
),
calcite_accordion_item(
heading = "Section 2",
"Content 2"
)
)
Create a Calcite Accordion Item Component
Description
Creates an individual accordion item that can be used within a calcite-accordion. Accordion items can be expanded and collapsed to show or hide content.
Usage
calcite_accordion_item(
...,
id = NULL,
heading = NULL,
description = NULL,
expanded = NULL,
heading_level = NULL,
icon_start = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
actions_start = NULL,
actions_end = NULL,
content_start = NULL,
content_end = NULL
)
Arguments
... |
Child content for the accordion item (default slot) |
id |
Component ID (required for Shiny reactivity) |
heading |
Heading text for the accordion item |
description |
Description text displayed in the header |
expanded |
Whether the item is currently expanded (default: FALSE) |
heading_level |
Semantic heading level (1-6) for accessibility |
icon_start |
Icon to display at the start of the header |
icon_end |
Icon to display at the end of the header |
icon_flip_rtl |
Flip icons in RTL languages: "start", "end", or "both" |
actions_start |
Content for the actions-start slot |
actions_end |
Content for the actions-end slot |
content_start |
Content for the content-start slot |
content_end |
Content for the content-end slot |
Details
Shiny Integration
The accordion item emits events when it's expanded or collapsed.
Available properties in input$id:
-
$expanded- Whether the item is currently expanded -
$heading- The heading text -
$description- The description text Other component properties
Basic usage:
calcite_accordion_item(
id = "item1",
heading = "Watercraft",
description = "Yachts, boats, and dinghies",
icon_start = "embark",
# Item content...
)
# In server
observeEvent(input$item1$expanded, {
if (input$item1$expanded) {
message("Item was expanded")
} else {
message("Item was collapsed")
}
})
Value
An object of class calcite_component
References
Examples
# Basic accordion item
calcite_accordion_item(
id = "watercraft",
heading = "Watercraft",
description = "Yachts, boats, and dinghies",
icon_start = "embark",
"Content goes here..."
)
Create a Calcite Action Component
Description
Creates an action button that can be used within action bars and action groups. Actions provide a compact way to trigger operations with icon-based buttons.
Usage
calcite_action(
text,
icon = NULL,
id = NULL,
active = NULL,
disabled = NULL,
indicator = NULL,
text_enabled = NULL,
scale = NULL,
alignment = NULL,
appearance = NULL,
loading = NULL,
label = NULL,
...
)
Arguments
text |
Text label for the action (required, also used for accessibility) |
icon |
Icon name from the Calcite icon set |
id |
Optional ID for the action (required for Shiny reactivity) |
active |
Whether the action is highlighted/selected |
disabled |
Whether the action is disabled |
indicator |
Whether to show a visual indicator (e.g., notification badge) |
text_enabled |
Whether to display the text label alongside the icon |
scale |
Size of the action: "s" (small), "m" (medium), or "l" (large) |
alignment |
Text alignment: "start", "center", or "end" |
appearance |
Visual style: "solid" or "transparent" |
loading |
Whether to show a loading indicator |
label |
Custom accessibility label (defaults to |
... |
Additional attributes passed to the component |
Details
Shiny Integration
When used in a Shiny app, calcite_action() returns a reactive list containing
all component properties. You can observe the entire component state or watch
individual properties:
Available properties:
-
$clicked- Boolean that toggles on each click (use this to detect clicks) -
$active- Whether the action is currently active/highlighted -
$disabled- Whether the action is disabled -
$icon- The icon name -
$text- The text label -
$indicator- Whether an indicator is shown -
$alignment,$appearance,$scale, etc. - Other component properties
Usage in server:
# Watch for any change to the action (including clicks)
observeEvent(input$my_action, {
print("Action changed!")
})
# Watch only the clicked state
observeEvent(input$my_action$clicked, {
print("Action was clicked!")
})
# Access specific properties
observeEvent(input$my_action, {
is_active <- input$my_action$active
click_state <- input$my_action$clicked
})
Value
An object of class calcite_component
References
Examples
# Basic action with icon
calcite_action(
text = "Layers",
icon = "layers",
id = "layers-action"
)
# Active action with text label
calcite_action(
text = "Settings",
icon = "gear",
active = TRUE,
text_enabled = TRUE
)
# Action with indicator
calcite_action(
text = "Notifications",
icon = "bell",
indicator = TRUE
)
# Shiny example
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_action(
id = "my_action",
text = "Click me",
icon = "check",
text_enabled = TRUE
),
verbatimTextOutput("status")
)
server <- function(input, output, session) {
# Respond to clicks
observeEvent(input$my_action$clicked, {
message("Action clicked! State: ", input$my_action$clicked)
})
# Display all properties
output$status <- renderPrint({
input$my_action
})
}
shinyApp(ui, server)
}
Create a Calcite Action Bar Component
Description
Action Bar is composed of calcite_action()s used for core operations in
the interface. When given an id, it acts as a Shiny input that reports
the text of the currently active action as input$id.
Usage
calcite_action_bar(
...,
id = NULL,
expand_disabled = NULL,
expanded = NULL,
floating = NULL,
layout = NULL,
overflow_actions_disabled = NULL,
position = NULL,
scale = NULL
)
Arguments
... |
|
id |
Optional ID. When provided, |
expand_disabled |
When |
expanded |
When |
floating |
When |
layout |
Layout direction of the actions: |
overflow_actions_disabled |
When |
position |
Position of the component: |
scale |
Size of the expand action: |
Details
Shiny Integration
When id is provided, input$id returns the text of the currently
active calcite_action(). The action bar manages active state automatically
— clicking an action activates it and deactivates all others.
observeEvent(input$my_bar, {
cat("Active action:", input$my_bar, "\n")
})
Use update_calcite() to programmatically set the active action by passing
the text value of the action to activate.
Value
An object of class calcite_component
References
Examples
calcite_action_bar(
id = "my_bar",
calcite_action(text = "Layers", icon = "layers", active = TRUE),
calcite_action(text = "Legend", icon = "legend")
)
Create a Calcite Action Group Component
Description
Groups multiple action components together with consistent layout and spacing. Action groups can be used within action bars to organize related actions.
Usage
calcite_action_group(
...,
id = NULL,
layout = NULL,
columns = NULL,
scale = NULL,
expanded = NULL,
label = NULL,
slot = NULL
)
Arguments
... |
Child |
id |
Optional ID for the action group |
layout |
Layout style: "vertical", "horizontal", or "grid" |
columns |
Number of columns when layout is "grid" (1-6) |
scale |
Size of the group: "s" (small), "m" (medium), or "l" (large) |
expanded |
Whether the group is expanded |
label |
Accessibility label for the group |
slot |
Optional slot name (e.g., "bottom-actions" for action bars) |
Value
An object of class calcite_component
References
Examples
# Basic action group with vertical layout
calcite_action_group(
calcite_action(text = "Add", icon = "plus"),
calcite_action(text = "Edit", icon = "pencil"),
calcite_action(text = "Delete", icon = "trash")
)
# Horizontal group with custom scale
calcite_action_group(
layout = "horizontal",
scale = "l",
calcite_action(text = "Save", icon = "save"),
calcite_action(text = "Cancel", icon = "x")
)
# Grid layout with 2 columns
calcite_action_group(
layout = "grid",
columns = 2,
calcite_action(text = "A", icon = "letter-a"),
calcite_action(text = "B", icon = "letter-b"),
calcite_action(text = "C", icon = "letter-c"),
calcite_action(text = "D", icon = "letter-d")
)
Create a ActionPad component
Description
Create a ActionPad component
Usage
calcite_action_pad(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| actionsEndGroupLabel | actions-end-group-label | Specifies the accessible label for the last calcite-action-group. | string | FALSE |
| expandDisabled | expand-disabled | When true, the expand-toggling behavior is disabled. | boolean | TRUE |
| expanded | expanded | When true, the component is expanded. | boolean | TRUE |
| layout | layout | Indicates the layout of the component. | "grid" | "horizontal" | "vertical" | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| position | position | Arranges the component depending on the element's dir property. | "end" | "start" | TRUE |
| scale | scale | Specifies the size of the expand calcite-action. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteActionPadToggle | Fires when the expanded property is toggled.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-actions to the component. |
| expand-tooltip | A slot to set the calcite-tooltip for the expand toggle.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_action_pad()
Create a Calcite Alert Component
Description
Alerts are meant to quickly convey a message to the user. They are ephemeral, workflow-specific messaging that is positioned absolutely over content.
Usage
calcite_alert(
kind = NULL,
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
calcite_alert_brand(
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
calcite_alert_danger(
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
calcite_alert_info(
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
calcite_alert_success(
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
calcite_alert_warning(
...,
id = NULL,
label = NULL,
open = NULL,
icon = TRUE,
icon_flip_rtl = NULL,
auto_close = NULL,
auto_close_duration = NULL,
placement = NULL,
queue = NULL,
scale = NULL,
numbering_system = NULL,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL
)
Arguments
kind |
Specifies the kind of alert: "brand", "danger", "info", "success", or "warning" (default: "brand") |
... |
Child content for the alert |
id |
Component ID (required for Shiny reactivity) |
label |
Accessible name for the component (required) |
open |
When true, displays and positions the component (default: FALSE) |
icon |
When TRUE, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon |
icon_flip_rtl |
When TRUE, the icon will be flipped when the element direction is right-to-left |
auto_close |
When TRUE, the component closes automatically. Recommended for passive, non-blocking alerts (default: FALSE) |
auto_close_duration |
Duration before auto-close: "fast", "medium", or "slow" (default: "medium") |
placement |
Placement of the component: "top", "top-start", "top-end", "bottom", "bottom-start", or "bottom-end" (default: "bottom") |
queue |
Ordering priority when opened: "immediate", "last", or "next" (default: "last") |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
numbering_system |
Unicode numeral system for localization: "arab", "arabext", or "latn" |
title |
Content for the title slot |
message |
Content for the message slot |
link |
Content for the link slot (typically |
actions_end |
Content for the actions-end slot (typically |
Details
Best Practices
While visually similar to Notice, Alert has distinct capabilities and intended use cases:
Alert:
Best for ephemeral, workflow-specific messaging
Generally should not be open at page load
Most often displayed as a result of user interaction
Positioned absolutely over content
Notice:
Best for informative, contextually relevant information
Can be open at page load, or displayed as a result of user action
Can be persisted in the interface or made closable
Modal:
Best for long-form messaging or narrative content
Can contain media or interactive elements
Generally presented as a result of user invocation
Writing and Copy
Alerts are meant to quickly convey a message to the user. Keep copy short and to the point. Consistent Alert structure, verbiage, and copy ensures users have an expected experience.
Shiny Integration
Available properties in input$id:
-
$open- Whether the alert is currently displayed -
$kind- The alert kind Other component properties
Events:
-
calciteAlertBeforeClose- Before closing transition begins -
calciteAlertBeforeOpen- Before opening transition begins -
calciteAlertClose- After close animation completes -
calciteAlertOpen- After open animation completes
Value
An object of class calcite_component
References
Examples
# Basic success alert
calcite_alert_success(
label = "Success",
icon = "smile",
open = TRUE,
title = "Everything worked out!",
message = "Take a moment to reflect on your day"
)
# Alert with link
calcite_alert_info(
label = "Notification",
open = TRUE,
title = "Something interesting just happened",
message = "We thought you might want to take a look",
link = calcite_link("Take action", href = "#")
)
Create a Avatar component
Description
Create a Avatar component
Usage
calcite_avatar(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| fullName | full-name | Specifies the full name of the user. When label and thumbnail are not defined, specifies the accessible name for the component. | string | TRUE |
| label | label | Specifies alternative text when thumbnail is defined, otherwise specifies an accessible label. | string | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| thumbnail | thumbnail | Specifies the src to an image (remember to add a token if the user is private). | string | TRUE |
| userId | user-id | Specifies the unique id of the user. | string | TRUE |
| username | username | Specifies the username of the user. | string | TRUE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_avatar()
Create a Calcite Block Component
Description
Creates a collapsible block component designed to house content and controls within a Panel, most often as part of an application layout with Shell Panels.
Usage
calcite_block(
...,
id = NULL,
heading = NULL,
description = NULL,
collapsible = TRUE,
expanded = TRUE,
disabled = NULL,
loading = NULL,
icon_start = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
scale = NULL,
heading_level = NULL,
label = NULL,
drag_disabled = NULL,
sort_handle_open = NULL,
menu_placement = NULL,
overlay_positioning = NULL
)
Arguments
... |
Child content for the block |
id |
Component ID (required for Shiny reactivity) |
heading |
Header text for the block |
description |
Description text displayed below the heading |
collapsible |
Whether the block can be collapsed (default: FALSE) |
expanded |
Whether the block is currently expanded (default: FALSE) |
disabled |
Whether interaction is prevented (default: FALSE) |
loading |
Whether to display a busy indicator (default: FALSE) |
icon_start |
Icon to display at the start of the header |
icon_end |
Icon to display at the end of the header |
icon_flip_rtl |
Flip icons in RTL languages: "start", "end", or "both" |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) |
heading_level |
Semantic heading level (1-6) for accessibility |
label |
Accessible name for the component |
drag_disabled |
Prevent dragging when parent Block Group enables it (default: FALSE) |
sort_handle_open |
Display and position the sort handle (default: FALSE) |
menu_placement |
Placement of the action menu |
overlay_positioning |
Positioning type for overlaid content: "absolute" or "fixed" |
Details
Shiny Integration
The block emits events when it's expanded or collapsed, making it easy to track state.
Available properties in input$id:
-
$expanded- Whether the block is currently expanded -
$collapsible- Whether the block is collapsible -
$disabled- Whether the block is disabled -
$heading- The heading text Other component properties
Basic usage:
calcite_block(
id = "my_block",
heading = "Layer effects",
description = "Adjust blur, highlight, and more",
collapsible = TRUE,
expanded = TRUE,
icon_start = "effects",
# Block content...
)
# In server
observeEvent(input$my_block$expanded, {
if (input$my_block$expanded) {
message("Block was expanded")
} else {
message("Block was collapsed")
}
})
Update from server:
# Programmatically expand or collapse the block
update_calcite("my_block", expanded = TRUE)
update_calcite("my_block", expanded = FALSE)
Value
An object of class calcite_component
References
Examples
# Basic collapsible block
calcite_block(
id = "effects_block",
heading = "Layer effects",
description = "Adjust blur, highlight, and more",
collapsible = TRUE,
icon_start = "effects",
"Block content goes here..."
)
Create a BlockSection component
Description
Create a BlockSection component
Usage
calcite_block_section(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| open | open | When true, expands the component and its contents. | boolean | TRUE |
| status | status | Displays a status-related indicator icon. | "idle" | "invalid" | "valid" | TRUE |
| text | text | The component header text. | string | FALSE |
| toggleDisplay | toggle-display | Specifies how the component's toggle is displayed, where: "button" sets the toggle to a selectable header, and "switch" sets the toggle to a switch. | "button" | "switch" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteBlockSectionToggle | Fires when the header has been clicked. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding custom content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_block_section()
Create a Calcite Button Component
Description
Creates an interactive button component that can be used for user actions. Buttons can display text, icons, or both, and support various visual styles.
Usage
calcite_button(
...,
id = NULL,
alignment = NULL,
appearance = NULL,
disabled = NULL,
download = NULL,
form = NULL,
href = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
icon_start = NULL,
kind = NULL,
label = NULL,
loading = NULL,
name = NULL,
rel = NULL,
round = NULL,
scale = NULL,
split_child = NULL,
target = NULL,
type = NULL,
width = NULL
)
Arguments
... |
Content for the button (default slot) - typically text or other elements |
id |
Component ID (required for Shiny reactivity) |
alignment |
Specifies the alignment of the component's elements: "center", "end", "icon-end-space-between", "icon-start-space-between", "space-between", or "start" (default: "center") |
appearance |
Specifies the appearance style: "outline", "outline-fill", "solid", or "transparent" (default: "solid") |
disabled |
When TRUE, interaction is prevented and the component is displayed with lower opacity (default: FALSE) |
download |
Prompts the user to save the linked URL instead of navigating to it. Can be TRUE or a string filename |
form |
The id of the form that will be associated with the component |
href |
Specifies the URL of the linked resource (absolute or relative path) |
icon_end |
Specifies an icon to display at the end of the component |
icon_flip_rtl |
Displays the iconStart and/or iconEnd as flipped when the element direction is RTL: "both", "end", or "start" |
icon_start |
Specifies an icon to display at the start of the component |
kind |
Specifies the kind of the component: "brand", "danger", "inverse", or "neutral" (default: "brand") |
label |
Accessible name for the component |
loading |
When TRUE, a busy indicator is displayed (default: FALSE) |
name |
Specifies the name of the component on form submission |
rel |
Defines the relationship between the href value and the current document |
round |
When TRUE, adds a round style to the component (default: FALSE) |
scale |
Specifies the size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
split_child |
Specifies if the component is a child of a calcite-split-button: "primary", "secondary", or boolean |
target |
Specifies where to open the linked document defined in href |
type |
Specifies the default behavior: "button", "reset", or "submit" (default: "button") |
width |
Specifies the width of the component: "auto", "full", or "half" (default: "auto"). Note: "half" is deprecated, use "full" instead. |
Details
Shiny Integration
When used in a Shiny app, calcite_button() returns a reactive list containing
component properties and a click counter. You can observe the entire component
state or watch individual properties:
Available properties:
-
$clicks- Integer count of how many times the button has been clicked -
$alignment,$appearance,$disabled,$kind,$scale, etc. - All component properties
Usage in server:
# Watch for button clicks using the clicks counter
observeEvent(input$my_button$clicks, {
print(paste("Button clicked", input$my_button$clicks, "times"))
})
# Or watch for any change to the button
observeEvent(input$my_button, {
print("Button changed!")
})
# Access specific properties
observeEvent(input$my_button, {
is_disabled <- input$my_button$disabled
click_count <- input$my_button$clicks
})
Value
An object of class calcite_component
References
Examples
# Basic button
calcite_button(
id = "my_button",
"Click Me!"
)
# Button with icon
calcite_button(
"Save",
icon_start = "save",
appearance = "solid",
kind = "brand"
)
# Outline button with icon at end
calcite_button(
"Delete",
icon_end = "trash",
appearance = "outline",
kind = "danger"
)
# Round icon-only button
calcite_button(
icon_start = "plus",
round = TRUE,
label = "Add item"
)
# Shiny example
if (interactive()) {
library(shiny)
ui <- div(
calcite_button(
id = "test_button",
"Click Me!",
appearance = "solid",
kind = "brand"
),
verbatimTextOutput("click_count")
)
server <- function(input, output, session) {
# Watch for button clicks
output$click_count <- renderText({
paste("Button clicked", input$test_button$clicks, "times")
})
}
shinyApp(ui, server)
}
Create a Card component
Description
Create a Card component
Usage
calcite_card(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| selectable | selectable | When true, the component is selectable. | boolean | TRUE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
| thumbnailPosition | thumbnail-position | Sets the placement of the thumbnail defined in the thumbnail slot. | "block-end" | "block-start" | "inline-end" | "inline-start" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteCardSelect | Fires when the deprecated selectable is true, or selectionMode set on parent calcite-card-group is not none and the component is selected.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding content. |
| title | Deprecated use heading instead. A slot for adding a heading. |
| subtitle | Deprecated use description instead. A slot for adding a description. |
| thumbnail | A slot for adding a thumbnail. |
| heading | A slot for adding a heading. |
| description | A slot for adding a description. |
| footer-start | A slot for adding a leading footer. |
| footer-end | A slot for adding a trailing footer. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_card()
Create a CardGroup component
Description
Create a CardGroup component
Usage
calcite_card_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| selectedItems | NA | Specifies the component's selected items. | Check API reference | FALSE |
| selectionMode | selection-mode | Specifies the selection mode of the component. | "multiple" | "none" | "single" | "single-persist" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteCardGroupSelect | Emits when the component's selection changes and the selectionMode is not none.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding one or more calcite-cards.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_card_group()
Create a Carousel component
Description
Create a Carousel component
Usage
calcite_carousel(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| arrowType | arrow-type | Specifies how and if the "previous" and "next" arrows are displayed. | "edge" | "inline" | "none" | TRUE |
| autoplay | autoplay | When true, the carousel will autoplay and controls will be displayed. When "paused" at time of initialization, the carousel will not autoplay, but controls will be displayed. | "" | "paused" | boolean | TRUE |
| autoplayDuration | autoplay-duration | When autoplay is true, specifies in milliseconds the length of time to display each Carousel Item. | number | TRUE |
| controlOverlay | control-overlay | Specifies if the component's controls are positioned absolutely on top of slotted Carousel Items. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| selectedItem | NA | The component's selected calcite-carousel-item. | HTMLCalciteCarouselItemElement | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteCarouselChange | Fires when the selected calcite-carousel-item changes. |
| calciteCarouselPause | Fires when the carousel autoplay state pauses due to a user hovering over the component or focusing on the component or slotted content |
| calciteCarouselPlay | Fires when the carousel autoplay is invoked by the user. |
| calciteCarouselResume | Fires when the carousel autoplay state resumes due to a user no longer hovering over the component or focusing on the component or slotted content |
| calciteCarouselStop | Fires when the carousel autoplay state is stopped by a user. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-carousel-items.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_carousel()
Create a CarouselItem component
Description
Create a CarouselItem component
Usage
calcite_carousel_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| label | label | Accessible name for the component. | string | FALSE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_carousel_item()
Create a Calcite Checkbox Component
Description
A checkbox allows users to make a binary selection, typically within a form or as a standalone toggle. Supports indeterminate state for tri-state behavior.
Usage
calcite_checkbox(
id = NULL,
checked = NULL,
disabled = NULL,
form = NULL,
indeterminate = NULL,
label = NULL,
label_text = NULL,
name = NULL,
required = NULL,
scale = NULL,
status = NULL,
value = NULL
)
Arguments
id |
Component ID (required for Shiny reactivity) |
checked |
When |
disabled |
When |
form |
Specifies the id of the component's associated form. |
indeterminate |
When |
label |
Specifies an accessible label for the component. |
label_text |
Specifies the component's label text. |
name |
Specifies the name of the component. Required to pass the component's value on form submission. |
required |
When |
scale |
Specifies the size of the component: |
status |
Specifies the status of the input field: |
value |
The component's value. |
Details
Shiny Integration
When an id is provided, the checkbox emits its state whenever it changes.
Available properties in input$id:
-
$checked- Whether the checkbox is checked -
$indeterminate- Whether the checkbox is in indeterminate state -
$value- The component's value -
$disabled- Whether the checkbox is disabled -
$name- The component's name -
$scale- The component's scale -
$status- The component's status
Events:
-
calciteCheckboxChange- Fires when the checked status changes
Value
An object of class calcite_component
References
Examples
calcite_checkbox(id = "agree", label_text = "I agree to the terms")
calcite_checkbox(
id = "opt_in",
label_text = "Subscribe to newsletter",
checked = TRUE,
scale = "l"
)
Create a Chip component
Description
Create a Chip component
Usage
calcite_chip(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| appearance | appearance | Specifies the appearance style of the component. | "outline" | "outline-fill" | "solid" | TRUE |
| closable | closable | When true, a close button is added to the component. | boolean | TRUE |
| closed | closed | When true, hides the component. | boolean | TRUE |
| closeOnDelete | close-on-delete | When true, the component closes when the Delete or Backspace key is pressed while focused. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| icon | icon | Specifies an icon to display. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| kind | kind | Specifies the kind of the component, which will apply to border and background if applicable. | "brand" | "inverse" | "neutral" | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| scale | scale | Specifies the size of the component. When contained in a parent calcite-chip-group inherits the parent's scale value. | "l" | "m" | "s" | TRUE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
| value | value | The component's value. | any | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteChipClose | Fires when the component's close button is selected. |
| calciteChipSelect | Fires when the selected state of the component changes. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
| image | A slot for adding an image. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_chip()
Create a ChipGroup component
Description
Create a ChipGroup component
Usage
calcite_chip_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| scale | scale | Specifies the size of the component. Child calcite-chips inherit the component's value. | "l" | "m" | "s" | TRUE |
| selectedItems | NA | Specifies the component's selected items. | Check API reference | FALSE |
| selectionMode | selection-mode | Specifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection, and "none" does not allow any selections. | "multiple" | "none" | "single" | "single-persist" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteChipGroupSelect | Fires when the component's selection changes. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding one or more calcite-chips.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_chip_group()
Create a ColorPicker component
Description
Create a ColorPicker component
Usage
calcite_color_picker(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| allowEmpty | allow-empty | When true, an empty color (null) will be allowed as a value. When false, a color value is enforced, and clearing the input or blurring will restore the last valid value. | boolean | TRUE |
| alphaChannel | alpha-channel | When true, the component will allow updates to the color's alpha value. | boolean | FALSE |
| channelsDisabled | channels-disabled | When true, hides the RGB/HSV channel inputs. | boolean | FALSE |
| clearable | clearable | When true, an empty color (null) will be allowed as a value. When false, a color value is enforced, and clearing the input or blurring will restore the last valid value. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| format | format | The format of value. When "auto", the format will be inferred from value when set. | "auto" | "hex" | "hexa" | "hsl" | "hsl-css" | "hsla" | "hsla-css" | "hsv" | "hsva" | "rgb" | "rgb-css" | "rgba" | "rgba-css" | TRUE |
| hexDisabled | hex-disabled | When true, hides the hex input. | boolean | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | TRUE |
| savedDisabled | saved-disabled | When true, hides the saved colors section. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| storageId | storage-id | Specifies the storage ID for colors. | string | TRUE |
| value | value | The component's value, where the value can be a CSS color string, or a RGB, HSL or HSV object. The type will be preserved as the color is updated. | (HSL & ObjectWithAlpha) | (HSV & ObjectWithAlpha) | (RGB & ObjectWithAlpha) | HSL | HSV | RGB | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteColorPickerChange | Fires when the color value has changed. |
| calciteColorPickerInput | Fires as the color value changes. Similar to the calciteColorPickerChange event with the exception of dragging. When dragging the color field or hue slider thumb, this event fires as the thumb is moved.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_color_picker()
Create a Combobox component
Description
Create a Combobox component
Usage
calcite_combobox(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| allowCustomValues | allow-custom-values | When true, allows entry of custom values, which are not in the original set of items. | boolean | TRUE |
| clearDisabled | clear-disabled | When true, the value-clearing will be disabled. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| filteredItems | NA | Specifies the component's filtered items. | Check API reference | FALSE |
| filterProps | NA | Specifies the properties to match against when filtering. If not set, all properties will be matched (label, description, metadata, value). | Check API reference | FALSE |
| filterText | filter-text | Text for the component's filter input field. | string | TRUE |
| flipPlacements | NA | Specifies the component's fallback slotted content placement when it's initial placement has insufficient space available. | Check API reference | FALSE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| maxItems | max-items | Specifies the maximum number of calcite-combobox-items (including nested children) to display before displaying a scrollbar. | number | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| name | name | Specifies the name of the component. Required to pass the component's value on form submission. | string | TRUE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placeholder | placeholder | Specifies the placeholder text for the input. | string | FALSE |
| placeholderIcon | placeholder-icon | Specifies the placeholder icon for the input. | string | TRUE |
| placeholderIconFlipRtl | placeholder-icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| readOnly | read-only | When true, the component's value can be read, but controls are not accessible and the value cannot be modified. | boolean | TRUE |
| required | required | When true and the component resides in a form, the component must have a value in order for the form to submit. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItems | NA | Specifies the component's selected items. | Check API reference | FALSE |
| selectionDisplay | selection-display | When selectionMode is "ancestors" or "multiple", specifies the display of multiple calcite-combobox-item selections, where: "all" displays all selections with individual calcite-chips, "fit" displays individual calcite-chips that scale to the component's size, including a non-closable calcite-chip, which provides the number of additional calcite-combobox-item selections not visually displayed, and "single" displays one calcite-chip with the total number of selections. | "all" | "fit" | "single" | TRUE |
| selectionMode | selection-mode | Specifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection, and "ancestors" allows multiple selections, but shows ancestors of selected items as selected, with only deepest children shown in chips. | "ancestors" | "multiple" | "single" | "single-persist" | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | The component's value(s) from the selected calcite-combobox-item(s). | Check API reference | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteComboboxBeforeClose | Fires when the component is requested to be closed, and before the closing transition begins. |
| calciteComboboxBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteComboboxChange | Fires when the selected item(s) changes. |
| calciteComboboxChipClose | Fires when a selected item in the component is closed via its calcite-chip. |
| calciteComboboxClose | Fires when the component is closed and animation is complete. |
| calciteComboboxFilterChange | Fires when text is added to filter the options list. |
| calciteComboboxOpen | Fires when the component is open and animation is complete. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-combobox-items.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_combobox()
Create a ComboboxItem component
Description
Create a ComboboxItem component
Usage
calcite_combobox_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| active | active | When true, the component is active. | boolean | TRUE |
| ancestors | NA | Specifies the parent and grandparent items, which are set on calcite-combobox. | Check API reference | FALSE |
| description | description | A description for the component, which displays below the heading. | string | FALSE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| filterDisabled | filter-disabled | When true, omits the component from the calcite-combobox filtered search results. | boolean | TRUE |
| guid | guid | The id attribute of the component. When omitted, a globally unique identifier is used. | string | TRUE |
| heading | heading | The component's text. | string | FALSE |
| icon | icon | Specifies an icon to display. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| label | label | The component's label. | any | FALSE |
| metadata | NA | Provides additional metadata to the component used in filtering. | Check API reference | FALSE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
| shortHeading | short-heading | The component's short heading. When provided, the short heading will be displayed in the component's selection. It is recommended to use 5 characters or fewer. | string | FALSE |
| textLabel | text-label | The component's text. | string | TRUE |
| value | value | The component's value. | any | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteComboboxItemChange | Fires whenever the component is selected or unselected. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding nested calcite-combobox-items. |
| content-end | A slot for adding non-actionable elements after the component's content. |
| content-start | A slot for adding non-actionable elements before the component's content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_combobox_item()
Create a ComboboxItemGroup component
Description
Create a ComboboxItemGroup component
Usage
calcite_combobox_item_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| ancestors | NA | Specifies the parent and grandparent calcite-combobox-items, which are set on calcite-combobox. | Check API reference | FALSE |
| label | label | Specifies the title of the component. | string | FALSE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-combobox-items.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_combobox_item_group()
Create a Calcite Date Picker Component
Description
Provides a calendar interface for selecting dates. Supports single date selection or date range selection with various customization options.
Usage
calcite_date_picker(
id = NULL,
value = NULL,
range = NULL,
min = NULL,
max = NULL,
scale = NULL,
layout = NULL,
calendars = NULL,
active_range = NULL,
heading_level = NULL,
month_style = NULL,
numbering_system = NULL,
proximity_selection_disabled = NULL,
...
)
Arguments
id |
Optional ID for the date picker (required for Shiny reactivity) |
value |
Selected date as a string ("yyyy-mm-dd"), or array of strings for range values |
range |
When TRUE, activates range mode to allow start and end dates (default: FALSE) |
min |
Earliest allowed date ("yyyy-mm-dd") |
max |
Latest allowed date ("yyyy-mm-dd") |
scale |
Specifies size of the component: "s" (small), "m" (medium), or "l" (large) |
layout |
Defines the layout: "horizontal" or "vertical" |
calendars |
Number of calendars displayed when range is TRUE: 1 or 2 (default: 2) |
active_range |
When range is TRUE, specifies active range: "start" or "end" |
heading_level |
Heading level for document structure (1-6) |
month_style |
Month display style: "wide" (default) or "abbreviated" |
numbering_system |
Unicode numeral system: "latn", "arab", or "arabext" |
proximity_selection_disabled |
When TRUE, disables default range narrowing behavior (default: FALSE) |
... |
Additional attributes passed to the component |
Details
Date Formats
Dates should be provided as strings in "yyyy-mm-dd" format
For range mode, provide an array:
c("2024-01-15", "2024-01-20")The component always returns dates as an array of strings, even in single date mode
Shiny Integration
When used in a Shiny app with an id, calcite_date_picker() returns a reactive
list containing component properties.
Available properties:
-
$value- Array of selected date strings (always an array, even for single dates) -
$range- Whether range mode is enabled -
$min- Minimum allowed date -
$max- Maximum allowed date Other component properties
Usage in server:
# Single date mode
observeEvent(input$my_date$value, {
selected_date <- input$my_date$value[1] # Get first (and only) date
message("Selected: ", selected_date)
})
# Range mode
observeEvent(input$my_date_range$value, {
start_date <- input$my_date_range$value[1]
end_date <- input$my_date_range$value[2]
message("Range: ", start_date, " to ", end_date)
})
Value
An object of class calcite_component
References
Examples
# Basic date picker
calcite_date_picker(
id = "my_date"
)
# Date picker with initial value
calcite_date_picker(
id = "event_date",
value = "2024-12-25"
)
# Date picker with min/max constraints
calcite_date_picker(
id = "booking_date",
min = "2024-01-01",
max = "2024-12-31"
)
# Range date picker
calcite_date_picker(
id = "date_range",
range = TRUE,
value = c("2024-01-15", "2024-01-20")
)
Create a Dialog component
Description
Create a Dialog component
Usage
calcite_dialog(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| beforeClose | NA | Passes a function to run before the component closes. | Check API reference | FALSE |
| closeDisabled | close-disabled | When true, disables the component's close button. | boolean | TRUE |
| description | description | A description for the component. | string | FALSE |
| dragEnabled | drag-enabled | When true, the component is draggable. | boolean | TRUE |
| escapeDisabled | escape-disabled | When true, disables the default close on escape behavior. By default, an open dialog can be dismissed by pressing the Esc key. | boolean | TRUE |
| heading | heading | The component header text. | string | FALSE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| kind | kind | Specifies the kind of the component, which will style the top border. | "brand" | "danger" | "info" | "success" | "warning" | TRUE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| menuOpen | menu-open | When true, the action menu items in the header-menu-actions slot are open. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| modal | modal | When true, displays a scrim blocking interaction underneath the component. | boolean | TRUE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| outsideCloseDisabled | outside-close-disabled | When true, disables the closing of the component when clicked outside. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Specifies the placement of the dialog. | "bottom" | "bottom-end" | "bottom-start" | "center" | "cover" | "top" | "top-end" | "top-start" | TRUE |
| resizable | resizable | When true, the component is resizable. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| width | width | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
| widthScale | width-scale | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteDialogBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteDialogBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteDialogClose | Fires when the component is closed and animation is complete. |
| calciteDialogOpen | Fires when the component is open and animation is complete. |
| calciteDialogScroll | Fires when the content is scrolled. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding content. |
| content | Deprecated Use custom-content slot instead. |
| custom-content | A slot for displaying custom content. Will prevent the rendering of any default Dialog UI, except for box-shadow and corner-radius. |
| action-bar | A slot for adding a calcite-action-bar to the component. |
| alerts | A slot for adding calcite-alerts to the component. |
| content-bottom | A slot for adding content below the unnamed (default) slot and - if populated - the footer slot. |
| content-top | A slot for adding content above the unnamed (default) slot and - if populated - below the action-bar slot. |
| header-actions-start | A slot for adding actions or content to the starting side of the component's header. |
| header-actions-end | A slot for adding actions or content to the ending side of the component's header. |
| header-content | A slot for adding custom content to the component's header. |
| header-menu-actions | A slot for adding an overflow menu with actions inside a calcite-dropdown. |
| fab | A slot for adding a calcite-fab (floating action button) to perform an action. |
| footer | A slot for adding custom content to the component's footer. Should not be used with the "footer-start" or "footer-end" slots. |
| footer-end | A slot for adding a trailing footer custom content. Should not be used with the "footer" slot. |
| footer-start | A slot for adding a leading footer custom content. Should not be used with the "footer" slot.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_dialog()
Create a Dropdown component
Description
Create a Dropdown component
Usage
calcite_dropdown(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closeOnSelectDisabled | close-on-select-disabled | When true, the component will remain open after a selection is made. If the selectionMode of the selected calcite-dropdown-item's containing calcite-dropdown-group is "none", the component will always close. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| flipPlacements | NA | Specifies the component's fallback calcite-dropdown-item placement when it's initial or specified placement has insufficient space available. | Check API reference | FALSE |
| maxItems | max-items | Specifies the maximum number of calcite-dropdown-items to display before showing a scroller. Value must be greater than 0, and does not include groupTitle's from calcite-dropdown-group. | number | TRUE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Determines where the component will be positioned relative to the container element. | "bottom" | "bottom-end" | "bottom-start" | "top" | "top-end" | "top-start" | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItems | NA | Specifies the component's selected items. | Check API reference | FALSE |
| type | type | Specifies the action to open the component from the container element. | "click" | "hover" | TRUE |
| width | width | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
| widthScale | width-scale | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteDropdownBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteDropdownBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteDropdownClose | Fires when the component is closed and animation is complete. |
| calciteDropdownOpen | Fires when the component is open and animation is complete. |
| calciteDropdownSelect | Fires when a calcite-dropdown-item's selection changes.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-dropdown-group elements. Every calcite-dropdown-item must have a parent calcite-dropdown-group, even if the groupTitle property is not set. |
| trigger | A slot for the element that triggers the calcite-dropdown.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_dropdown()
Create a DropdownGroup component
Description
Create a DropdownGroup component
Usage
calcite_dropdown_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| groupTitle | group-title | Specifies and displays a group title. | string | TRUE |
| selectionMode | selection-mode | Specifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, and "none" does not allow any selections. | "multiple" | "none" | "single" | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-dropdown-items.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_dropdown_group()
Create a DropdownItem component
Description
Create a DropdownItem component
Usage
calcite_dropdown_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| href | href | Specifies the URL of the linked resource, which can be set as an absolute or relative path. Determines if the component will render as an anchor. | string | TRUE |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| rel | rel | Specifies the relationship to the linked document defined in href. | string | TRUE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
| target | target | Specifies the frame or window to open the linked document. | string | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteDropdownItemSelect | Fires when the component is selected. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_dropdown_item()
Create a Fab component
Description
Create a Fab component
Usage
calcite_fab(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| appearance | appearance | Specifies the appearance style of the component. | "outline-fill" | "solid" | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| icon | icon | Specifies an icon to display. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| kind | kind | Specifies the kind of the component, which will apply to border and background. | "brand" | "danger" | "inverse" | "neutral" | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| text | text | Specifies text to accompany the component's icon. | string | FALSE |
| textEnabled | text-enabled | When true, displays the text value in the component. | boolean | TRUE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_fab()
Create a Filter component
Description
Create a Filter component
Usage
calcite_filter(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| filteredItems | NA | The component's resulting items after filtering. | Check API reference | FALSE |
| filterProps | NA | Specifies the properties to match against when filtering. This will only apply when value is an object. If not set, all properties will be matched. | Check API reference | FALSE |
| items | NA | Defines the items to filter. The component uses the values as the starting point, and returns items that contain the string entered in the input, using a partial match and recursive search. This property is needed to conduct filtering. | Check API reference | FALSE |
| label | label | Specifies an accessible name for the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| placeholder | placeholder | Specifies placeholder text for the input element. | string | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| value | value | The component's value. | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteFilterChange | Fires when the filter text changes. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_filter()
Create a Flow component
Description
Create a Flow component
Usage
calcite_flow(...)
Arguments
... |
named attributes passed to |
Details
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-flow-item elements to the component.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_flow()
Create a FlowItem component
Description
Create a FlowItem component
Usage
calcite_flow_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| beforeBack | NA | When provided, the method will be called before it is removed from its parent calcite-flow. | Check API reference | FALSE |
| beforeClose | NA | Passes a function to run before the component closes. | Check API reference | FALSE |
| closable | closable | When true, displays a close button in the trailing side of the component's header. | boolean | TRUE |
| closed | closed | When true, the component will be hidden. | boolean | TRUE |
| collapsed | collapsed | When true, hides the component's content area. | boolean | TRUE |
| collapsible | collapsible | When true, the component is collapsible. | boolean | TRUE |
| description | description | A description for the component. | string | FALSE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| heading | heading | The component header text. | string | FALSE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| menuOpen | menu-open | When true, the action menu items in the header-menu-actions slot are open. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selected | selected | When true, flow-item is displayed within a parent flow. | boolean | TRUE |
| showBackButton | show-back-button | When true, displays a back button in the component's header. | boolean | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteFlowItemBack | Fires when the back button is clicked. |
| calciteFlowItemClose | Fires when the close button is clicked. |
| calciteFlowItemScroll | Fires when the content is scrolled. |
| calciteFlowItemToggle | Fires when the collapse button is clicked. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding custom content. |
| action-bar | A slot for adding a calcite-action-bar to the component. |
| alerts | A slot for adding calcite-alerts to the component. |
| content-top | A slot for adding content above the unnamed (default) slot and below the action-bar slot (if populated). |
| content-bottom | A slot for adding content below the unnamed (default) slot and above the footer slot (if populated) |
| header-actions-start | A slot for adding calcite-actions or content to the start side of the component's header. |
| header-actions-end | A slot for adding calcite-actions or content to the end side of the component's header. |
| header-content | A slot for adding custom content to the component's header. |
| header-menu-actions | A slot for adding an overflow menu with calcite-actions inside a calcite-dropdown. |
| fab | A slot for adding a calcite-fab (floating action button) to perform an action. |
| footer | A slot for adding custom content to the component's footer. Should not be used with the "footer-start" or "footer-end" slots. |
| footer-actions | Deprecated Use the "footer" slot instead. A slot for adding calcite-buttons to the component's footer. |
| footer-end | A slot for adding a trailing footer custom content. Should not be used with the "footer" slot. |
| footer-start | A slot for adding a leading footer custom content. Should not be used with the "footer" slot.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_flow_item()
Create a Icon component
Description
Create a Icon component
Usage
calcite_icon(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| flipRtl | flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| icon | icon | Displays a specific icon. | string | TRUE |
| preload | preload | When true, it loads preloads the icon data. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| textLabel | text-label | Accessible name for the component. It is recommended to set this value if your icon is semantic. | string | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_icon()
Create a InlineEditable component
Description
Create a InlineEditable component
Usage
calcite_inline_editable(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| afterConfirm | NA | Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. | Check API reference | FALSE |
| controls | controls | When true and editingEnabled is true, displays save and cancel controls on the component. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| editingEnabled | editing-enabled | When true, inline editing is enabled on the component. | boolean | TRUE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| scale | scale | Specifies the size of the component. Defaults to the scale of the wrapped calcite-input or the scale of the closest wrapping component with a set scale. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteInlineEditableEditCancel | Emits when the component's "cancel editing" button is pressed. |
| calciteInlineEditableEditConfirm | Emits when the component's "confirm edits" button is pressed. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding a calcite-input.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_inline_editable()
Create a InputDatePicker component
Description
Create a InputDatePicker component
Usage
calcite_input_date_picker(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| flipPlacements | NA | Specifies the component's fallback calcite-date-picker placement when it's initial or specified placement has insufficient space available. | Check API reference | FALSE |
| focusTrapDisabled | focus-trap-disabled | When true, prevents focus trapping. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| layout | layout | Defines the layout of the component. | "horizontal" | "vertical" | TRUE |
| max | max | When the component resides in a form, specifies the latest allowed date ("yyyy-mm-dd"). | string | TRUE |
| maxAsDate | NA | Specifies the latest allowed date as a full date object. | Date | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| min | min | When the component resides in a form, specifies the earliest allowed date ("yyyy-mm-dd"). | string | TRUE |
| minAsDate | NA | Specifies the earliest allowed date as a full date object. | Date | FALSE |
| monthStyle | month-style | Specifies the monthStyle used by the component. | "abbreviated" | "wide" | FALSE |
| name | name | Specifies the name of the component. Required to pass the component's value on form submission. | string | TRUE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. | "arab" | "arabext" | "latn" | TRUE |
| open | open | When true, displays the calcite-date-picker component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Specifies the placement of the calcite-date-picker relative to the component. | "bottom" | "bottom-end" | "bottom-start" | "top" | "top-end" | "top-start" | TRUE |
| proximitySelectionDisabled | proximity-selection-disabled | When true, disables the default behavior on the third click of narrowing or extending the range. Instead starts a new range. | boolean | FALSE |
| range | range | When true, activates a range for the component. | boolean | TRUE |
| readOnly | read-only | When true, the component's value can be read, but controls are not accessible and the value cannot be modified. | boolean | TRUE |
| required | required | When true and the component resides in a form, the component must have a value in order for the form to submit. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | Selected date as a string in ISO format ("yyyy-mm-dd"). | Check API reference | FALSE |
| valueAsDate | NA | The component's value as a full date object. | Check API reference | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteInputDatePickerBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteInputDatePickerBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteInputDatePickerChange | Fires when the component's value changes. |
| calciteInputDatePickerClose | Fires when the component is closed and animation is complete. |
| calciteInputDatePickerOpen | Fires when the component is open and animation is complete. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_input_date_picker()
Create a Calcite File Input Component
Description
Creates a file input component for selecting files from the user's device.
Use the accept argument to restrict which file types can be selected.
This component works by syncing with Shiny's native file upload mechanism
to handle file transfers to the server.
Usage
calcite_input_file(
id = NULL,
accept = NULL,
multiple = FALSE,
disabled = NULL,
label = NULL,
label_text = NULL,
required = NULL,
scale = NULL,
validation_icon = NULL,
validation_message = NULL
)
Arguments
id |
Component ID (required for Shiny reactivity) |
accept |
A character vector of accepted file extensions without the
leading period (e.g. |
multiple |
When |
disabled |
When |
label |
Accessible label for the component. |
label_text |
Label text displayed on the component. |
required |
When |
scale |
Size of the component: |
validation_icon |
Validation icon to display ( |
validation_message |
Validation message to display under the component. |
Details
Shiny Integration
When used in a Shiny app, calcite_input_file() works like shiny::fileInput()
and returns a data frame via input$id with one row per uploaded file.
Columns in input$id:
-
name- The filename provided by the browser -
size- File size in bytes -
type- MIME type (e.g.,"text/csv") -
datapath- Path to a temp file containing the uploaded data. Use this path to read the file contents (e.g.,read.csv(input$my_file$datapath[1]))
The uploaded files are stored in a temporary directory and will be deleted when the Shiny session ends.
Value
An object of class calcite_component
References
Examples
# Accept CSV files only
calcite_input_file(
id = "my_file",
accept = "csv",
label_text = "Upload a CSV file"
)
# Accept multiple image formats
calcite_input_file(
id = "my_file",
accept = c("png", "jpg", "jpeg", "gif"),
multiple = TRUE,
label_text = "Upload images"
)
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_panel(
heading = "File Upload",
calcite_input_file(
id = "csv_upload",
accept = "csv",
label_text = "Upload CSV"
),
tableOutput("contents")
)
)
server <- function(input, output, session) {
output$contents <- renderTable({
req(input$csv_upload)
read.csv(input$csv_upload$datapath[1])
})
}
shinyApp(ui, server)
}
Create a Calcite Input Message Component
Description
Creates a message component that displays validation messages, hints, and other contextual feedback for input components.
Usage
calcite_input_message(
...,
status = NULL,
icon = NULL,
icon_flip_rtl = NULL,
scale = NULL,
id = NULL
)
Arguments
... |
Content for the message (default slot) - typically text or textOutput() |
status |
Status of the message: "idle", "valid", or "invalid" (default: "idle") |
icon |
Specifies an icon to display (TRUE for default or icon name) |
icon_flip_rtl |
When TRUE, icon is flipped in RTL direction (default: FALSE) |
scale |
Size of the component: "s", "m", or "l" (default: "m") |
id |
Component ID (optional) |
Details
Usage
Input messages are typically used inside a calcite_label() component alongside
an input to provide contextual feedback, validation messages, or hints.
Status Options
-
"valid": Green checkmark icon, success message
-
"invalid": Red warning icon, error message
-
"idle": Default state, informational message
Dynamic Messages
Use textOutput() in the slot and renderText() in the server to create dynamic
validation messages. Use update_calcite() to change the status/icon properties.
Value
An object of class calcite_component
References
Examples
# Static message
calcite_input_message(
"Username is available",
status = "valid",
icon = TRUE
)
# Dynamic message with textOutput
calcite_input_message(
shiny::textOutput("validation_msg"),
status = "invalid",
icon = "exclamation-mark-circle",
id = "msg"
)
# With input in a label
calcite_label(
label = "Username",
calcite_input_text(
id = "username",
placeholder = "Enter username"
),
calcite_input_message(
"Username must be 3-20 characters",
status = "idle"
)
)
Create a Calcite Input Number Component
Description
Creates a number input component for form entry where users can enter numeric values. Supports integer-only mode, min/max constraints, and number formatting.
Usage
calcite_input_number(
id = NULL,
value = NULL,
name = NULL,
placeholder = NULL,
label = NULL,
label_text = NULL,
alignment = NULL,
autocomplete = NULL,
clearable = NULL,
disabled = NULL,
form = NULL,
group_separator = NULL,
icon = NULL,
icon_flip_rtl = NULL,
integer = NULL,
loading = NULL,
max = NULL,
min = NULL,
number_button_type = NULL,
numbering_system = NULL,
prefix_text = NULL,
read_only = NULL,
required = NULL,
scale = NULL,
status = NULL,
step = NULL,
suffix_text = NULL,
validation_icon = NULL,
validation_message = NULL,
action = NULL,
label_content = NULL
)
Arguments
id |
Component ID (required for Shiny reactivity) |
value |
The component's value |
name |
Specifies the name of the component (required for form submission) |
placeholder |
Specifies placeholder text for the component |
label |
Accessible name for the component |
label_text |
When provided, displays label text on the component |
alignment |
Text alignment of the value: "start", "center", or "end" (default: "start") |
autocomplete |
Type of content to autocomplete for forms |
clearable |
When TRUE, shows a clear button when the component has a value (default: FALSE) |
disabled |
When TRUE, interaction is prevented and displayed with lower opacity (default: FALSE) |
form |
The id of the form associated with the component |
group_separator |
When TRUE, number values display with a group separator corresponding to the language and country format (default: FALSE) |
icon |
Specifies an icon to display (TRUE for default or icon name) |
icon_flip_rtl |
When TRUE, icon is flipped in RTL direction (default: FALSE) |
integer |
When TRUE, restricts the component to integer numbers only and disables exponential notation (default: FALSE) |
loading |
When TRUE, displays a busy indicator (default: FALSE) |
max |
Maximum value for the input |
min |
Minimum value for the input |
number_button_type |
Placement of the increment/decrement buttons: "vertical", "horizontal", or "none" (default: "vertical") |
numbering_system |
Unicode numeral system: "arab", "arabext", or "latn" |
prefix_text |
Text to display at the start of the component |
read_only |
When TRUE, value can be read but not modified (default: FALSE) |
required |
When TRUE, must have a value for form submission (default: FALSE) |
scale |
Size of the component: "s", "m", or "l" (default: "m") |
status |
Status of the input field: "idle", "valid", or "invalid" (default: "idle") |
step |
Granularity the value must adhere to (can be "any" or a number) |
suffix_text |
Text to display at the end of the component |
validation_icon |
Validation icon to display (TRUE or icon name) |
validation_message |
Validation message to display |
action |
Content for the action slot (typically a calcite_action) |
label_content |
Content for the label-content slot |
Details
Shiny Integration
When used in a Shiny app, calcite_input_number() returns a reactive list containing:
Available properties:
-
$value- The current numeric value (as string) -
$validity- Object containing validation state (valid, badInput, rangeOverflow, etc.) -
$status- Current status ("idle", "valid", "invalid") Other component properties
Usage in server:
# Watch for value changes
observeEvent(input$age$value, {
age_num <- as.numeric(input$age$value)
print(paste("Age:", age_num))
})
# Check validity
observeEvent(input$age, {
if (input$age$validity$valid) {
print("Valid number entered")
}
if (input$age$validity$rangeOverflow) {
print("Number is too large")
}
})
Value
An object of class calcite_component
References
Examples
# Basic number input
calcite_input_number(
id = "quantity",
placeholder = "Enter quantity"
)
# Integer-only input with constraints
calcite_input_number(
id = "age",
integer = TRUE,
min = 0,
max = 120,
step = 1,
required = TRUE
)
# Price input with formatting
calcite_input_number(
id = "price",
prefix_text = "$",
group_separator = TRUE,
step = 0.01,
min = 0
)
# Percentage input
calcite_input_number(
id = "percent",
suffix_text = "%",
min = 0,
max = 100,
step = 1
)
Create a Calcite Input Text Component
Description
Creates a text input component for form entry where users can enter text values. Supports validation, length constraints, and pattern matching.
Usage
calcite_input_text(
id = NULL,
value = NULL,
name = NULL,
placeholder = NULL,
label = NULL,
label_text = NULL,
alignment = NULL,
autocomplete = NULL,
clearable = NULL,
disabled = NULL,
form = NULL,
icon = NULL,
icon_flip_rtl = NULL,
loading = NULL,
max_length = NULL,
min_length = NULL,
pattern = NULL,
prefix_text = NULL,
read_only = NULL,
required = NULL,
scale = NULL,
status = NULL,
suffix_text = NULL,
validation_icon = NULL,
validation_message = NULL,
action = NULL,
label_content = NULL
)
Arguments
id |
Component ID (required for Shiny reactivity) |
value |
The component's value |
name |
Specifies the name of the component (required for form submission) |
placeholder |
Specifies placeholder text for the component |
label |
Accessible name for the component |
label_text |
When provided, displays label text on the component |
alignment |
Text alignment of the value: "start", "center", or "end" (default: "start") |
autocomplete |
Type of content to autocomplete for forms |
clearable |
When TRUE, shows a clear button when the component has a value (default: FALSE) |
disabled |
When TRUE, interaction is prevented and displayed with lower opacity (default: FALSE) |
form |
The id of the form associated with the component |
icon |
Specifies an icon to display (TRUE for default or icon name) |
icon_flip_rtl |
When TRUE, icon is flipped in RTL direction (default: FALSE) |
loading |
When TRUE, displays a busy indicator (default: FALSE) |
max_length |
Maximum length of text for the component's value |
min_length |
Minimum length of text for the component's value |
pattern |
Regular expression pattern the value must match for validation |
prefix_text |
Text to display at the start of the component |
read_only |
When TRUE, value can be read but not modified (default: FALSE) |
required |
When TRUE, must have a value for form submission (default: FALSE) |
scale |
Size of the component: "s", "m", or "l" (default: "m") |
status |
Status of the input field: "idle", "valid", or "invalid" (default: "idle") |
suffix_text |
Text to display at the end of the component |
validation_icon |
Validation icon to display (TRUE or icon name) |
validation_message |
Validation message to display |
action |
Content for the action slot (typically a calcite_action) |
label_content |
Content for the label-content slot |
Details
Shiny Integration
When used in a Shiny app, calcite_input_text() returns a reactive list containing:
Available properties:
-
$value- The current text value -
$validity- Object containing validation state (valid, tooLong, tooShort, patternMismatch, etc.) -
$status- Current status ("idle", "valid", "invalid") Other component properties
Usage in server:
# Watch for value changes
observeEvent(input$username$value, {
print(paste("Username:", input$username$value))
})
# Check validity
observeEvent(input$username, {
if (input$username$validity$valid) {
print("Valid username entered")
}
if (input$username$validity$tooShort) {
print("Username is too short")
}
})
Value
An object of class calcite_component
References
Examples
# Basic text input
calcite_input_text(
id = "username",
placeholder = "Enter username"
)
# Text input with length constraints
calcite_input_text(
id = "username",
min_length = 3,
max_length = 20,
required = TRUE
)
# Text input with pattern validation
calcite_input_text(
id = "zip_code",
pattern = "\\d{5}",
placeholder = "12345"
)
# Search input with icon
calcite_input_text(
id = "search",
icon = "search",
clearable = TRUE,
placeholder = "Search..."
)
Create a InputTimePicker component
Description
Create a InputTimePicker component
Usage
calcite_input_time_picker(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| focusTrapDisabled | focus-trap-disabled | When true, prevents focus trapping. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| hourFormat | hour-format | Specifies the component's hour format, where: "user" displays the user's locale format, "12" displays a 12-hour format, and "24" displays a 24-hour format. | "12" | "24" | "user" | TRUE |
| max | max | When the component resides in a form, specifies the maximum value. | string | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| min | min | When the component resides in a form, specifies the minimum value. | string | TRUE |
| name | name | Specifies the name of the component on form submission. | string | FALSE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| open | open | When true, displays the calcite-time-picker component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | FALSE |
| placement | placement | Determines where the popover will be positioned relative to the input. | "auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start" | TRUE |
| readOnly | read-only | When true, the component's value can be read, but controls are not accessible and the value cannot be modified. | boolean | TRUE |
| required | required | When true and the component resides in a form, the component must have a value in order for the form to submit. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| step | step | Specifies the granularity the component's value must adhere to (in seconds). | number | FALSE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | The time value in ISO (24-hour) format. | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteInputTimePickerBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteInputTimePickerBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteInputTimePickerChange | Fires when the component's value is changes. |
| calciteInputTimePickerClose | Fires when the component is closed and animation is complete. |
| calciteInputTimePickerOpen | Fires when the component is open and animation is complete. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_input_time_picker()
Create a InputTimeZone component
Description
Create a InputTimeZone component
Usage
calcite_input_time_zone(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| clearable | clearable | When true, an empty value (null) will be allowed as a value. When false, an offset or name value is enforced, and clearing the input or blurring will restore the last valid value. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| maxItems | max-items | Specifies the component's maximum number of options to display before displaying a scrollbar. | number | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| mode | mode | This specifies the type of value and the associated options presented to the user: Using "offset" will provide options that show timezone offsets. Using "name" will provide options that show the IANA time zone names. | "name" | "offset" | "region" | TRUE |
| name | name | Specifies the name of the component. Required to pass the component's value on form submission. | string | TRUE |
| offsetStyle | offset-style | Specifies how the offset will be displayed, where "user" uses UTC or GMT depending on the user's locale, "gmt" always uses GMT, and "utc" always uses UTC. This only applies to the offset mode. | "gmt" | "user" | "utc" | TRUE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| readOnly | read-only | When true, the component's value can be read, but controls are not accessible and the value cannot be modified. | boolean | TRUE |
| referenceDate | reference-date | This date will be used as a reference to Daylight Savings Time when creating time zone item groups. It can be either a Date instance or a string in ISO format ("YYYY-MM-DD", "YYYY-MM-DDTHH:MM:SS.SSSZ"). | Date | string | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | The component's value, where the value is the time zone offset or the difference, in minutes, between the selected time zone and UTC. If no value is provided, the user's time zone offset will be selected by default. | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteInputTimeZoneBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteInputTimeZoneBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteInputTimeZoneChange | Fires when the component's value changes. |
| calciteInputTimeZoneClose | Fires after the component is closed and animation is complete. |
| calciteInputTimeZoneOpen | Fires after the component is opened and animation is complete. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_input_time_zone()
Create a Calcite Label Component
Description
Creates a label component that wraps and provides accessible text for form controls and other interactive elements.
Usage
calcite_label(
label,
...,
target_id = NULL,
id = NULL,
alignment = NULL,
layout = NULL,
scale = NULL
)
Arguments
label |
The label text (required) |
... |
Child components to wrap within the label (e.g., calcite_input_text()) |
target_id |
The id of the component this label is bound to (only needed when
the labeled component is outside the label). Maps to the |
id |
Component ID (optional) |
alignment |
Specifies the text alignment of the component: "start", "center", or "end" (default: "start") |
layout |
Defines the layout of the label: "block", "default", "inline", or "inline-space-between" (default: "default"). Note: "default" is deprecated, use "block" instead |
scale |
Specifies the size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
Value
An object of class calcite_component
References
Examples
# Label wrapping an input
calcite_label(
label = "Username",
calcite_input_text(
id = "username",
placeholder = "Enter username"
)
)
# Label with inline layout
calcite_label(
label = "Subscribe",
layout = "inline",
calcite_checkbox(id = "subscribe")
)
# Label with external component (using target_id)
htmltools::tagList(
calcite_label(
label = "Password",
target_id = "password"
),
calcite_input_text(id = "password", placeholder = "Enter password")
)
Create a Calcite Link Component
Description
Creates a link component for navigation or performing actions. Links are useful for tertiary-level actions or inline navigation within text.
Usage
calcite_link(
text,
href,
id = NULL,
disabled = NULL,
download = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
icon_start = NULL,
rel = NULL,
target = NULL
)
Arguments
text |
The link text to display (required) |
href |
The URL of the linked resource (required) - can be absolute or relative path |
id |
Component ID (optional) |
disabled |
When TRUE, interaction is prevented and the component is displayed with lower opacity (default: FALSE) |
download |
Prompts the user to save the linked URL instead of navigating to it. Can be TRUE or a string filename |
icon_end |
Specifies an icon to display at the end of the link |
icon_flip_rtl |
Displays the iconStart and/or iconEnd as flipped when the element direction is RTL: "both", "end", or "start" |
icon_start |
Specifies an icon to display at the start of the link |
rel |
Specifies the relationship to the linked document (e.g., "noopener", "noreferrer") |
target |
Specifies the frame or window to open the linked document (e.g., "_blank", "_self", "_parent", "_top") |
Details
Usage Guidelines
Use Links for:
Navigation to another page or section
Tertiary-level actions in a group
Inline actions within sentences
Use Buttons instead for:
Primary actions like "Create", "Submit", "Upload"
Task completion actions
Prominent calls to action
Best Practices
Avoid making entire sentences into links
Link text should be descriptive of the destination
Use
target = "_blank"withrel = "noopener noreferrer"for external links
Value
An object of class calcite_component
References
Examples
# Basic link
calcite_link(
text = "View documentation",
href = "https://developers.arcgis.com/calcite-design-system/"
)
# Link with icon
calcite_link(
text = "External site",
href = "https://example.com",
icon_end = "launch",
target = "_blank",
rel = "noopener noreferrer"
)
# Download link
calcite_link(
text = "Download report",
href = "/files/report.pdf",
download = "monthly-report.pdf",
icon_start = "download"
)
# Disabled link
calcite_link(
text = "Coming soon",
href = "#",
disabled = TRUE
)
Create a List component
Description
A general purpose list that enables users to construct list items that conform to Calcite styling.
Usage
calcite_list(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| canPull | NA | When provided, the method will be called to determine whether the element can move from the list. | (detail: ListDragDetail) => boolean | FALSE |
| canPut | NA | When provided, the method will be called to determine whether the element can be added from another list. | (detail: ListDragDetail) => boolean | FALSE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| displayMode | display-mode | Specifies the nesting behavior of calcite-list-items, where "flat" displays calcite-list-items in a uniform list, and "nested" displays calcite-list-items under their parent element. The parent component's behavior should follow throughout its child elements. | "flat" | "nested" | TRUE |
| dragEnabled | drag-enabled | When true, calcite-list-items are sortable via a draggable button. | boolean | TRUE |
| filteredData | NA | The currently filtered calcite-list-item data. | Check API reference | FALSE |
| filteredItems | NA | The currently filtered calcite-list-items. | Check API reference | FALSE |
| filterEnabled | filter-enabled | When true, an input appears at the top of the component that can be used by end users to filter calcite-list-items. | boolean | TRUE |
| filterLabel | filter-label | Specifies an accessible name for the filter input field. | string | TRUE |
| filterPlaceholder | filter-placeholder | Placeholder text for the component's filter input field. | string | TRUE |
| filterPredicate | NA | Specifies a function to handle filtering. | (item: HTMLCalciteListItemElement) => boolean | FALSE |
| filterProps | NA | Specifies the properties to match against when filtering. If not set, all properties will be matched (label, description, metadata, value, group heading). | Check API reference | FALSE |
| filterText | filter-text | Text for the component's filter input field. | string | TRUE |
| group | group | The list's group identifier. To drag elements from one list into another, both lists must have the same group value. | string | TRUE |
| interactionMode | interaction-mode | Specifies the interaction mode of the component. "interactive" allows interaction styling and pointer changes on hover "static" does not allow interaction styling and pointer changes on hover The "static" value should only be used when selectionMode is "none". | "interactive" | "static" | TRUE |
| label | label | Specifies an accessible name for the component. When dragEnabled is true and multiple list sorting is enabled with group, specifies the component's name for dragging between lists. | string | FALSE |
| loading | loading | When true, a busy indicator is displayed. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItems | NA | The currently selected items. | Check API reference | FALSE |
| selectionAppearance | selection-appearance | Specifies the selection appearance - "icon" (displays a checkmark or dot) or "border" (displays a border). | "border" | "icon" | TRUE |
| selectionMode | selection-mode | Specifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection, and "none" does not allow any selections. | "multiple" | "none" | "single" | "single-persist" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteListChange | Fires when the component's selected items have changed. |
| calciteListDragEnd | Fires when the component's dragging has ended. |
| calciteListDragStart | Fires when the component's dragging has started. |
| calciteListFilter | Fires when the component's filter has changed. |
| calciteListOrderChange | Fires when the component's item order changes. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-list-item and calcite-list-item-group elements. |
| filter-actions-start | A slot for adding actionable calcite-action elements before the filter component. |
| filter-actions-end | A slot for adding actionable calcite-action elements after the filter component. |
| filter-no-results | When filterEnabled is true, a slot for adding content to display when no results are found.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_list()
Create a ListItem component
Description
Create a ListItem component
Usage
calcite_list_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closable | closable | When true, a close button is added to the component. | boolean | TRUE |
| closed | closed | When true, hides the component. | boolean | TRUE |
| description | description | A description for the component. Displays below the label text. | string | FALSE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| dragDisabled | drag-disabled | When true, the item is not draggable. | boolean | TRUE |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| label | label | The label text of the component. Displays above the description text. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| metadata | NA | Provides additional metadata to the component. Primary use is for a filter on the parent calcite-list. | Check API reference | FALSE |
| open | open | When true, the item is open to show child components. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selected | selected | When true and the parent calcite-list's selectionMode is "single", "single-persist"', or "multiple"`, the component is selected. | boolean | TRUE |
| sortHandleOpen | sort-handle-open | When true, displays and positions the sort handle. | boolean | TRUE |
| unavailable | unavailable | When true, the component's content appears inactive. | boolean | TRUE |
| value | value | The component's value. | any | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteListItemClose | Fires when the close button is clicked. |
| calciteListItemSelect | Fires when the component is selected. |
| calciteListItemSortHandleBeforeClose | Fires when the sort handle is requested to be closed and before the closing transition begins. |
| calciteListItemSortHandleBeforeOpen | Fires when the sort handle is added to the DOM but not rendered, and before the opening transition begins. |
| calciteListItemSortHandleClose | Fires when the sort handle is closed and animation is complete. |
| calciteListItemSortHandleOpen | Fires when the sort handle is open and animation is complete. |
| calciteListItemToggle | Fires when the open button is clicked. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-list, calcite-list-item and calcite-list-item-group elements. |
| actions-start | A slot for adding actionable calcite-action elements before the content of the component. |
| content-start | A slot for adding non-actionable elements before the label and description of the component. |
| content | A slot for adding non-actionable, centered content in place of the label and description of the component. |
| content-end | A slot for adding non-actionable elements after the label and description of the component. |
| actions-end | A slot for adding actionable calcite-action elements after the content of the component. |
| content-bottom | A slot for adding content below the component's label and description.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_list_item()
Create a ListItemGroup component
Description
Create a ListItemGroup component
Usage
calcite_list_item_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| heading | heading | The header text for all nested calcite-list-item rows. | string | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-list-item and calcite-list-item-group elements.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_list_item_group()
Create a Loader component
Description
Create a Loader component
Usage
calcite_loader(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| inline | inline | When true, displays smaller and appears to the left of the text. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| text | text | Text that displays under the component's indicator. | string | FALSE |
| type | type | Specifies the component type. Use "indeterminate" if finding actual progress value is impossible. Otherwise, use "determinate" to have the value indicate the progress or "determinate-value" to have the value label displayed along the progress. | "determinate" | "determinate-value" | "indeterminate" | TRUE |
| value | value | The component's value. Valid only for "determinate" indicators. Percent complete of 100. | number | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_loader()
Create a Menu component
Description
Create a Menu component
Usage
calcite_menu(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| label | label | Accessible name for the component. | string | FALSE |
| layout | layout | Specifies the layout of the component. | "horizontal" | "vertical" | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_menu()
Create a MenuItem component
Description
Create a MenuItem component
Usage
calcite_menu_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| active | active | When true, the component is highlighted. | boolean | TRUE |
| breadcrumb | breadcrumb | When true, the component displays a breadcrumb trail for use as a navigational aid. | boolean | TRUE |
| href | href | Specifies the URL destination of the component, which can be set as an absolute or relative path. | string | FALSE |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| open | open | When true, the component will display any slotted calcite-menu-item in an open overflow menu. | boolean | TRUE |
| rel | rel | Defines the relationship between the href value and the current document. | string | TRUE |
| target | target | Specifies where to open the linked document defined in the href property. | string | TRUE |
| text | text | Specifies the text to display. | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteMenuItemSelect | Emits when the component is selected. |
Slots
The following slots are provided by this component:
| Slot | Description |
| submenu-item | A slot for adding calcite-menu-items in a submenu.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_menu_item()
Create a Meter component
Description
Create a Meter component
Usage
calcite_meter(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| appearance | appearance | Specifies the appearance style of the component. | "outline" | "outline-fill" | "solid" | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| fillType | fill-type | Specifies the component's display, where "single" displays a single color and "range" displays a range of colors based on provided low, high, min or max values. | "range" | "single" | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| groupSeparator | group-separator | When true, number values are displayed with a group separator corresponding to the language and country format. | boolean | TRUE |
| high | high | Specifies a high value. When fillType is "range", displays a different color when above the specified threshold. | number | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| low | low | Specifies a low value. When fillType is "range", displays a different color when above the specified threshold. | number | TRUE |
| max | max | Specifies the highest allowed value of the component. | number | TRUE |
| min | min | Specifies the lowest allowed value of the component. | number | TRUE |
| name | name | Specifies the name of the component. Required to pass the component's value on form submission. | string | TRUE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| rangeLabels | range-labels | When true, displays the values of high, low, min, and max. | boolean | TRUE |
| rangeLabelType | range-label-type | When rangeLabels is true, specifies the format of displayed labels. | "percent" | "units" | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| unitLabel | unit-label | When rangeLabelType is "units" and either valueLabel or rangeLabels are true, displays beside the value and/or min values. | string | FALSE |
| value | value | Specifies the current value of the component. | number | FALSE |
| valueLabel | value-label | When true, displays the current value. | boolean | TRUE |
| valueLabelType | value-label-type | When valueLabel is true, specifies the format of displayed label. | "percent" | "units" | TRUE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_meter()
Create a Modal component
Description
Use the calcite-dialog component instead.
Usage
calcite_modal(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| beforeClose | NA | Passes a function to run before the component closes. | Check API reference | FALSE |
| closeButtonDisabled | close-button-disabled | When true, disables the component's close button. | boolean | TRUE |
| docked | docked | When true, prevents the component from expanding to the entire screen on mobile devices. | boolean | TRUE |
| escapeDisabled | escape-disabled | When true, disables the default close on escape behavior. | boolean | TRUE |
| focusTrapDisabled | focus-trap-disabled | When true, prevents focus trapping. | boolean | TRUE |
| fullscreen | fullscreen | Sets the component to always be fullscreen. Overrides widthScale and --calcite-modal-width / --calcite-modal-height. | boolean | TRUE |
| kind | kind | Specifies the kind of the component, which will apply to top border. | "brand" | "danger" | "info" | "success" | "warning" | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| outsideCloseDisabled | outside-close-disabled | When true, disables the closing of the component when clicked outside. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| widthScale | width-scale | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteModalBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteModalBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteModalClose | Fires when the component is closed and animation is complete. |
| calciteModalOpen | Fires when the component is open and animation is complete. |
Slots
The following slots are provided by this component:
| Slot | Description |
| header | A slot for adding header text. |
| content | A slot for adding the component's content. |
| content-top | A slot for adding content to the component's sticky header, where content remains at the top of the component when scrolling up and down. |
| content-bottom | A slot for adding content to the component's sticky footer, where content remains at the bottom of the component when scrolling up and down. |
| primary | A slot for adding a primary button. |
| secondary | A slot for adding a secondary button. |
| back | A slot for adding a back button. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_modal()
Create a Navigation component
Description
Create a Navigation component
Usage
calcite_navigation(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| label | label | When navigationAction is true, specifies the label of the calcite-action. | string | FALSE |
| navigationAction | navigation-action | When true, displays a calcite-action and emits a calciteNavActionSelect event on selection change. | boolean | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteNavigationActionSelect | When navigationAction is true, emits when the displayed action selection changes.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| logo | A slot for adding a calcite-logo component to the primary navigation level. |
| user | A slot for adding a calcite-user component to the primary navigation level. |
| progress | A slot for adding a calcite-progress component to the primary navigation level. |
| navigation-action | A slot for adding a calcite-action component to the primary navigation level. |
| content-start | A slot for adding a calcite-menu, calcite-action, or other interactive elements in the start position of any navigation level. |
| content-center | A slot for adding a calcite-menu, calcite-action, or other interactive elements in the center position of the primary navigation level. |
| content-end | A slot for adding a calcite-menu, calcite-action, or other interactive elements in the end position of any navigation level. |
| navigation-secondary | A slot for adding a calcite-navigation component in the secondary navigation level. Components rendered here will not display calcite-navigation-logo or calcite-navigation-user components. |
| navigation-tertiary | A slot for adding a calcite-navigation component in the tertiary navigation level. Components rendered here will not display calcite-navigation-logo or calcite-navigation-user components.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_navigation()
Create a NavigationLogo component
Description
Create a NavigationLogo component
Usage
calcite_navigation_logo(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| active | active | When true, the component is highlighted. | boolean | TRUE |
| description | description | A description for the component, which displays below the heading. | string | FALSE |
| heading | heading | Specifies heading text for the component, such as a product or organization name. | string | FALSE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| href | href | Specifies the URL destination of the component, which can be set as an absolute or relative path. | string | TRUE |
| icon | icon | Specifies an icon to display. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| label | label | Describes the appearance or function of the thumbnail. If no label is provided, context will not be provided to assistive technologies. | string | FALSE |
| rel | rel | Defines the relationship between the href value and the current document. | string | TRUE |
| target | target | Specifies where to open the linked document defined in the href property. | string | TRUE |
| thumbnail | thumbnail | Specifies the src to an image. | string | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_navigation_logo()
Create a NavigationUser component
Description
Create a NavigationUser component
Usage
calcite_navigation_user(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| active | active | When true, the component is highlighted. | boolean | TRUE |
| fullName | full-name | Specifies the full name of the user. | string | FALSE |
| label | label | Describes the appearance of the avatar. If no label is provided, context will not be provided to assistive technologies. | string | FALSE |
| textDisabled | text-disabled | When true, hides the fullName and username contents. | boolean | TRUE |
| thumbnail | thumbnail | Specifies the src to an image (remember to add a token if the user is private). | string | FALSE |
| userId | user-id | Specifies the unique id of the user. | string | FALSE |
| username | username | Specifies the username of the user. | string | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_navigation_user()
Create a Calcite Notice Component
Description
Creates a notice component for displaying informative, contextually relevant messages. Best for persistent information that can be open at page load or displayed as a result of user action.
Usage
calcite_notice(
...,
title = NULL,
message = NULL,
link = NULL,
actions_end = NULL,
id = NULL,
open = NULL,
closable = NULL,
icon = NULL,
icon_flip_rtl = NULL,
kind = NULL,
scale = NULL,
width = NULL
)
Arguments
... |
Additional content passed to the component |
title |
Content for the title slot |
message |
Content for the message slot |
link |
Content for the link slot (e.g. a |
actions_end |
Content for the actions-end slot |
id |
Component ID (required for Shiny reactivity) |
open |
Whether the notice is visible (default: FALSE) |
closable |
Whether to show a close button (default: FALSE) |
icon |
Show default icon (TRUE) or specific icon name (string) |
icon_flip_rtl |
Flip icon in RTL languages (default: FALSE) |
kind |
Type of notice: "brand", "danger", "info", "success", or "warning" |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) |
width |
Width behavior: "auto" or "full" (note: "half" is deprecated) |
Details
Shiny Integration
The notice emits events when opened or closed, making it easy to track state and respond to user dismissals.
Available properties in input$id:
-
$open- Whether the notice is currently visible -
$closable- Whether the notice can be closed -
$kind- The type of notice Other component properties
Basic usage:
calcite_notice(
id = "my_notice",
open = TRUE,
closable = TRUE,
kind = "success",
icon = TRUE,
title = "Success!",
message = "Your changes have been saved."
)
# In server - detect when user closes the notice
observeEvent(input$my_notice$open, {
if (!input$my_notice$open) {
message("User dismissed the notice")
}
})
Show/hide from server:
# Show a notice
update_calcite("my_notice", open = TRUE)
# Hide a notice
update_calcite("my_notice", open = FALSE)
Slots
The notice supports several slots for organizing content:
-
title: The notice title
-
message: The notice message
-
link: A calcite-action for links like "Read more"
-
actions-end: Additional actions (recommended: 2 or fewer)
Best Practices
Use for informative, contextually relevant information
Can be open at page load or shown based on user action
Can be persistent or closable
Use appropriate
kindto convey message severity
Value
An object of class calcite_component
References
Examples
# Basic notice
calcite_notice(
open = TRUE,
icon = TRUE,
closable = TRUE,
title = "New feature available",
message = "Check out the reporting dashboard"
)
# Notice with specific icon and kind
calcite_notice(
open = TRUE,
kind = "danger",
icon = "exclamation-mark-triangle",
title = "Error in form",
message = "Please correct the highlighted fields"
)
# Notice with action link
calcite_notice(
open = TRUE,
icon = "layers-reference",
title = "Try this trick",
message = "Select multiple layers at once",
link = calcite_link(text = "Read more", href = "#")
)
# Shiny example with server control
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_panel(
heading = "Notice Demo",
calcite_notice(
id = "my_notice",
open = FALSE,
closable = TRUE,
kind = "success",
icon = TRUE,
title = "Success!",
message = "Your action completed successfully"
),
calcite_button(
id = "show_notice",
"Show Notice"
),
verbatimTextOutput("notice_status")
)
)
server <- function(input, output, session) {
observeEvent(input$show_notice$clicks, {
update_calcite("my_notice", open = TRUE)
})
output$notice_status <- renderPrint({
input$my_notice
})
}
shinyApp(ui, server)
}
Create a Calcite Option Component
Description
Option provides a selectable item within a calcite_select() component.
Each option represents a single choice in the select dropdown menu.
Usage
calcite_option(label, value, disabled = NULL, selected = NULL, ...)
Arguments
label |
Text label for the option (required for accessibility) |
value |
The component's value (can be any type) |
disabled |
When true, interaction is prevented and the component is displayed with lower opacity |
selected |
When true, the component is selected |
... |
Additional attributes passed to the component |
Details
Options are used within calcite_select() to define the available choices.
The value parameter determines what value will be sent to Shiny when the
option is selected.
Value
An object of class calcite_component
References
Examples
# Basic option
calcite_option(
label = "First Option",
value = "1"
)
# Selected option
calcite_option(
label = "Default Selection",
value = "default",
selected = TRUE
)
# Disabled option
calcite_option(
label = "Unavailable",
value = "unavailable",
disabled = TRUE
)
# Use with calcite_select
calcite_select(
id = "my_select",
label = "Choose one",
calcite_option(label = "Option 1", value = "1"),
calcite_option(label = "Option 2", value = "2", selected = TRUE),
calcite_option(label = "Option 3", value = "3")
)
Create a OptionGroup component
Description
Create a OptionGroup component
Usage
calcite_option_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-options.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_option_group()
Create a Pagination component
Description
Create a Pagination component
Usage
calcite_pagination(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| groupSeparator | group-separator | When true, number values are displayed with a group separator corresponding to the language and country format. | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| pageSize | page-size | Specifies the number of items per page. | number | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| startItem | start-item | Specifies the starting item number. | number | TRUE |
| totalItems | total-items | Specifies the total number of items. | number | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calcitePaginationChange | Emits when the selected page changes. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_pagination()
Create a Calcite Panel Component
Description
Panel is a container that can house interactions as well as live within other Calcite Components. It provides a header with heading text and a summary, and slots to add Actions and Icons to the start and end of the header.
Usage
calcite_panel(
...,
id = NULL,
heading = NULL,
description = NULL,
closable = NULL,
closed = NULL,
collapsed = NULL,
collapse_direction = NULL,
collapsible = NULL,
disabled = NULL,
heading_level = NULL,
icon = NULL,
icon_flip_rtl = NULL,
loading = NULL,
menu_flip_placements = NULL,
menu_open = NULL,
menu_placement = NULL,
message_overrides = NULL,
overlay_positioning = NULL,
scale = NULL,
action_bar = NULL,
alerts = NULL,
content_bottom = NULL,
content_top = NULL,
header_actions_start = NULL,
header_actions_end = NULL,
header_content = NULL,
header_menu_actions = NULL,
fab = NULL,
footer = NULL,
footer_start = NULL,
footer_end = NULL
)
Arguments
... |
Main content for the panel (default slot) |
id |
Component ID (required for Shiny reactivity) |
heading |
Header text for the panel |
description |
Description text displayed below the heading |
closable |
Whether to display a close button in the header (default: FALSE) |
closed |
Whether the component is hidden (default: FALSE) |
collapsed |
Whether the content area is hidden (default: FALSE) |
collapse_direction |
Direction of collapse icon: "down" or "up" (default: "down") |
collapsible |
Whether the panel can be collapsed (default: FALSE) |
disabled |
Whether interaction is prevented (default: FALSE) |
heading_level |
Semantic heading level (1-6) for accessibility |
icon |
Icon to display in the header |
icon_flip_rtl |
Flip icon in RTL languages (default: FALSE) |
loading |
Whether to display a busy indicator (default: FALSE) |
menu_flip_placements |
Fallback placements for the menu when space is insufficient |
menu_open |
Whether the action menu items are open (default: FALSE) |
menu_placement |
Placement of the action menu (default: "bottom-end") |
message_overrides |
Override individual strings used by the component |
overlay_positioning |
Positioning type for overlaid content: "absolute" or "fixed" (default: "absolute") |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
action_bar |
Content for the action-bar slot (typically |
alerts |
Content for the alerts slot (typically |
content_bottom |
Content below the main slot and above the footer |
content_top |
Content above the main slot and below the action-bar |
header_actions_start |
Actions or content at the start of the header |
header_actions_end |
Actions or content at the end of the header |
header_content |
Custom content for the header |
header_menu_actions |
Overflow menu with actions (typically in |
fab |
Floating action button (typically |
footer |
Custom content for the footer (don't use with footer_start/footer_end) |
footer_start |
Leading footer content (don't use with footer slot) |
footer_end |
Trailing footer content (don't use with footer slot) |
Details
Shiny Integration
The panel emits events when it's closed, collapsed, expanded, scrolled, or toggled.
Available properties in input$id:
-
$closable- Whether the close button is displayed -
$closed- Whether the panel is hidden -
$collapsed- Whether the content area is collapsed -
$collapsible- Whether the panel is collapsible -
$disabled- Whether the panel is disabled Other component properties
Events:
-
calcitePanelClose- Fires when the close button is clicked -
calcitePanelCollapse- Fires when the content area is collapsed -
calcitePanelExpand- Fires when the content area is expanded -
calcitePanelScroll- Fires when the content is scrolled -
calcitePanelToggle- Fires when the collapse button is clicked
Value
An object of class calcite_component
References
Examples
# Basic panel with heading
calcite_panel(
id = "my_panel",
heading = "Map Options",
"Panel content goes here..."
)
# Collapsible panel with icon
calcite_panel(
heading = "Layer effects",
description = "Adjust blur, highlight, and more",
collapsible = TRUE,
icon = "effects",
"Panel content"
)
# Panel with header actions and footer
calcite_panel(
heading = "Settings",
header_actions_start = calcite_action(
icon = "question",
text = "Help",
slot = "header-actions-start"
),
header_actions_end = calcite_action(
icon = "save",
text = "Save",
slot = "header-actions-end"
),
footer = htmltools::tagList(
calcite_button(width = "half", appearance = "outline", "Cancel"),
calcite_button(width = "half", "Save")
),
"Panel content"
)
Create a Popover component
Description
Create a Popover component
Usage
calcite_popover(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| autoClose | auto-close | When true, clicking outside of the component automatically closes open calcite-popovers. | boolean | TRUE |
| closable | closable | When true, displays a close button within the component. | boolean | TRUE |
| flipDisabled | flip-disabled | When true, prevents flipping the component's placement when overlapping its referenceElement. | boolean | TRUE |
| flipPlacements | NA | Specifies the component's fallback placement when it's initial or specified placement has insufficient space available. | Check API reference | FALSE |
| focusTrapDisabled | focus-trap-disabled | When true, prevents focus trapping. | boolean | TRUE |
| heading | heading | The component header text. | string | FALSE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| initialFocusTrapFocus | initial-focus-trap-focus | Specifies whether focus should move to the popover when the focus trap is activated. @internal | ((() => FocusTargetValueOrFalse)) | HTMLElement | SVGElement | boolean | string | FALSE |
| label | label | Accessible name for the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| offsetDistance | offset-distance | Offsets the position of the popover away from the referenceElement. | number | TRUE |
| offsetSkidding | offset-skidding | Offsets the position of the component along the referenceElement. | number | TRUE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" value should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Determines where the component will be positioned relative to the referenceElement. | "auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start" | TRUE |
| pointerDisabled | pointer-disabled | When true, removes the caret pointer. | boolean | TRUE |
| referenceElement | reference-element | The referenceElement used to position the component according to its placement value. Setting to an HTMLElement is preferred so the component does not need to query the DOM. However, a string id of the reference element can also be used. | Element | VirtualElement | string | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| triggerDisabled | trigger-disabled | When true, disables automatically toggling the component when its referenceElement has been triggered. This property can be set to true to manage when the component is open. | boolean | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calcitePopoverBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calcitePopoverBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calcitePopoverClose | Fires when the component is closed and animation is complete. |
| calcitePopoverOpen | Fires when the component is open and animation is complete. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding custom content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_popover()
Create a Progress component
Description
Create a Progress component
Usage
calcite_progress(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| label | label | Accessible name for the component. | string | FALSE |
| reversed | reversed | When true and for "indeterminate" progress bars, reverses the animation direction. | boolean | TRUE |
| text | text | Text that displays under the component's indicator. | string | FALSE |
| type | type | Specifies the component type. Use "indeterminate" if finding actual progress value is impossible. | "determinate" | "indeterminate" | TRUE |
| value | value | When type is "determinate", specifies the component's value with a range of 0 to 100. | number | FALSE |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_progress()
Create a RadioButton component
Description
Create a RadioButton component
Usage
calcite_radio_button(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| checked | checked | When true, the component is checked. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| name | name | Specifies the name of the component. Can be inherited from calcite-radio-button-group. Required to pass the component's value on form submission. | string | TRUE |
| required | required | When true and the component resides in a form, the component must have a value selected from the calcite-radio-button-group in order for the form to submit. | boolean | TRUE |
| scale | scale | Specifies the size of the component inherited from the calcite-radio-button-group. | "l" | "m" | "s" | TRUE |
| value | value | The component's value. | any | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteRadioButtonChange | Fires only when the radio button is checked. This behavior is identical to the native HTML input element. Since this event does not fire when the radio button is unchecked, it's not recommended to attach a listener for this event directly on the element, but instead either attach it to a node that contains all of the radio buttons in the group or use the calciteRadioButtonGroupChange event if using this with calcite-radio-button-group.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_radio_button()
Create a RadioButtonGroup component
Description
Create a RadioButtonGroup component
Usage
calcite_radio_button_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| layout | layout | Defines the layout of the component. | "grid" | "horizontal" | "vertical" | TRUE |
| name | name | Specifies the name of the component on form submission. Must be unique to other component instances. | string | TRUE |
| required | required | When true and the component resides in a form, the component must have a value in order for the form to submit. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItem | NA | Specifies the component's selected item. | HTMLCalciteRadioButtonElement | FALSE |
| status | status | Specifies the status of the validation message. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteRadioButtonGroupChange | Fires when the component has changed. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-radio-buttons.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_radio_button_group()
Create a Rating component
Description
Create a Rating component
Usage
calcite_rating(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| average | average | Specifies a cumulative average from previous ratings to display. | number | TRUE |
| count | count | Specifies the number of previous ratings to display. | number | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| name | name | Specifies the name of the component. Required to pass the component's value on form submission. | string | TRUE |
| readOnly | read-only | When true, the component's value can be read, but cannot be modified. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| showChip | show-chip | When true, and if available, displays the average and/or count data summary in a calcite-chip. | boolean | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | The component's value. | number | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteRatingChange | Fires when the component's value changes. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_rating()
Create a Calcite Scrim Component
Description
Scrims are an overlay placed on top of content to show disabled or loading
states. By default, Scrim positions to the extent of its closest parent.
To display a Scrim with custom positioning, add position: relative styling
to its closest parent container.
Usage
calcite_scrim(..., id = NULL, loading = FALSE)
Arguments
... |
Main content for the scrim (default slot — primarily loading information) |
id |
Component ID (required for Shiny reactivity) |
loading |
When |
Details
Shiny Integration
When given an id, the scrim reports its state as input$id — a named list:
-
$loading— logical, whether the loading indicator is shown
Use update_calcite(id, loading = TRUE/FALSE) to toggle the loading state
from the server.
Positioning
Scrim fills its closest positioned parent. Wrap the area you want to cover
in a container with position: relative so the scrim covers the right region.
Value
An object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_scrim(id = "my_scrim", loading = TRUE)
Create a Calcite Segmented Control Component
Description
Creates a segmented control for selecting between multiple options. Similar to radio buttons but with a more compact, segmented button appearance.
Usage
calcite_segmented_control(
...,
id = NULL,
value = NULL,
appearance = NULL,
disabled = NULL,
layout = NULL,
scale = NULL,
width = NULL,
name = NULL,
label_text = NULL,
status = NULL,
validation_message = NULL,
required = NULL
)
Arguments
... |
Additional attributes passed to the component |
id |
Component ID (required for Shiny reactivity) |
value |
Initial selected value (should match a child item's value) |
appearance |
Visual style: "solid", "outline", or "outline-fill" |
disabled |
Whether the control is disabled (default: FALSE) |
layout |
Orientation: "horizontal" or "vertical" |
scale |
Size of the control: "s" (small), "m" (medium), or "l" (large) |
width |
Width behavior: "auto" or "full" |
name |
Name for form submission |
label_text |
Label displayed on the component |
status |
Validation state: "idle", "valid", or "invalid" |
validation_message |
Message displayed for validation feedback |
required |
Whether selection is required |
Details
Shiny Integration
The segmented control emits a calciteSegmentedControlChange event when the
selected item changes.
Available properties in input$id:
-
$value- Currently selected value (matches a child item's value attribute) -
$disabled- Whether the control is disabled -
$scale- Current scale setting Other component properties
Basic usage:
calcite_segmented_control(
id = "effect_type",
width = "full",
calcite_segmented_control_item(value = "blur"),
calcite_segmented_control_item(value = "highlight", checked = TRUE),
calcite_segmented_control_item(value = "party")
)
# In server
observeEvent(input$effect_type, {
selected <- input$effect_type$value
print(paste("Selected:", selected))
})
Update from server:
update_calcite("effect_type", value = "blur")
Value
An object of class calcite_component
References
Examples
# Basic segmented control
calcite_segmented_control(
id = "view_mode",
calcite_segmented_control_item(value = "list", icon_start = "list"),
calcite_segmented_control_item(value = "grid", icon_start = "grid", checked = TRUE),
calcite_segmented_control_item(value = "table", icon_start = "table")
)
# Full width with text
calcite_segmented_control(
id = "effect",
width = "full",
calcite_segmented_control_item(value = "Blur"),
calcite_segmented_control_item(value = "Highlight", checked = TRUE),
calcite_segmented_control_item(value = "Party mode")
)
# Shiny example
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_card(
heading = "Segmented Control Example",
calcite_label(
"Choose an option",
calcite_segmented_control(
id = "my_control",
width = "full",
calcite_segmented_control_item(value = "option1"),
calcite_segmented_control_item(value = "option2", checked = TRUE),
calcite_segmented_control_item(value = "option3")
)
),
verbatimTextOutput("selected_value")
)
)
server <- function(input, output, session) {
output$selected_value <- renderPrint({
paste("Selected:", input$my_control$value)
})
}
shinyApp(ui, server)
}
Create a Calcite Segmented Control Item Component
Description
Creates an individual item within a segmented control. Must be used as a child
of calcite_segmented_control().
Usage
calcite_segmented_control_item(
value,
label = value,
checked = NULL,
icon_start = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
...
)
Arguments
value |
The value this item represents (required) |
label |
Text label displayed for the item (defaults to |
checked |
Whether this item is initially selected (default: FALSE) |
icon_start |
Icon to display at the start of the item |
icon_end |
Icon to display at the end of the item |
icon_flip_rtl |
Whether to flip the icon in RTL languages (default: FALSE) |
... |
Additional content or attributes (text label if provided as unnamed argument) |
Value
An object of class calcite_component
References
Examples
# Item with text label
calcite_segmented_control_item(value = "option1")
# Item with icon
calcite_segmented_control_item(
value = "list",
icon_start = "list"
)
# Initially selected item
calcite_segmented_control_item(
value = "default",
checked = TRUE
)
Create a Calcite Select Component
Description
Select provides a single-selection dropdown menu for forms. It displays
a list of options that users can choose from. You can either provide
values and labels vectors for convenience, or manually construct
calcite_option() components.
Usage
calcite_select(
...,
values = NULL,
labels = NULL,
id = NULL,
label,
disabled = NULL,
form = NULL,
label_text = NULL,
message_overrides = NULL,
name = NULL,
required = NULL,
scale = NULL,
status = NULL,
validation_icon = NULL,
validation_message = NULL,
value = NULL,
width = NULL,
label_content = NULL
)
Arguments
... |
calcite-option components (default slot). Ignored if |
values |
Character vector of option values. When provided, options are automatically
generated from |
labels |
Character vector of option labels (display text). Must be same length as |
id |
Component ID (required for Shiny reactivity) |
label |
Accessible name for the component (required) |
disabled |
When true, interaction is prevented and the component is displayed with lower opacity |
form |
The id of the form that will be associated with the component |
label_text |
When provided, displays label text on the component |
message_overrides |
Override individual strings used by the component |
name |
Specifies the name of the component. Required to pass the component's value on form submission |
required |
When true, the component must have a value for the form to submit |
scale |
Specifies the size of the component: "s" (small), "m" (medium), or "l" (large) |
status |
Specifies the status of the input field: "idle", "invalid", or "valid" |
validation_icon |
Specifies the validation icon to display under the component |
validation_message |
Specifies the validation message to display under the component |
value |
The component's selectedOption value |
width |
Specifies the width of the component: "auto", "full", or "half" (half is deprecated) |
label_content |
Content to render next to the component's labelText (slot) |
Details
Shiny Integration
When used in a Shiny app, calcite_select() returns a reactive list containing
the component's state. The component emits a calciteSelectChange event when
the selection changes.
Available properties in input$id:
-
$value- The value of the selected option -
$disabled- Whether the select is disabled -
$scale- The size of the component -
$status- The validation status Other component properties
Events:
-
calciteSelectChange- Fires when the selected option changes
Value
An object of class calcite_component
References
Examples
# Using values and labels vectors (convenient)
calcite_select(
id = "my_select",
label = "Choose terrain type",
values = c("mountains", "rivers", "lakes", "buttes", "fjords"),
labels = c("Mountains", "Rivers", "Lakes", "Buttes", "Fjords")
)
# Using values only (labels default to values)
calcite_select(
id = "simple_select",
label = "Choose an option",
values = c("option1", "option2", "option3")
)
# Manually constructing options (more control)
calcite_select(
id = "fruit_select",
label = "Choose a fruit",
label_text = "Select your favorite fruit",
scale = "m",
calcite_option(label = "Apple", value = "apple"),
calcite_option(label = "Banana", value = "banana", selected = TRUE),
calcite_option(label = "Orange", value = "orange")
)
# Required select with validation
calcite_select(
id = "required_select",
label = "Required field",
label_text = "Make a selection",
required = TRUE,
status = "invalid",
validation_message = "Please select an option",
calcite_option(label = "Choose...", value = ""),
calcite_option(label = "Option A", value = "a"),
calcite_option(label = "Option B", value = "b")
)
Create a Sheet component
Description
Create a Sheet component
Usage
calcite_sheet(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| beforeClose | NA | Passes a function to run before the component closes. | Check API reference | FALSE |
| displayMode | display-mode | Specifies the display mode - "float" (content is separated detached), or "overlay" (displays on top of center content). | "float" | "overlay" | TRUE |
| escapeDisabled | escape-disabled | When true, disables the default close on escape behavior. | boolean | TRUE |
| focusTrapDisabled | focus-trap-disabled | When true, prevents focus trapping. | boolean | TRUE |
| height | height | Specifies the height of the component. | "l" | "m" | "s" | TRUE |
| heightScale | height-scale | When position is "block-start" or "block-end", specifies the height of the component. | "l" | "m" | "s" | TRUE |
| label | label | Specifies the label of the component. | string | FALSE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| open | open | When true, displays and positions the component. | boolean | TRUE |
| outsideCloseDisabled | outside-close-disabled | When true, disables the closing of the component when clicked outside. | boolean | TRUE |
| position | position | Determines where the component will be positioned. | "block-end" | "block-start" | "inline-end" | "inline-start" | TRUE |
| resizable | resizable | When true, the component is resizable. | boolean | TRUE |
| width | width | Specifies the width of the component. | "l" | "m" | "s" | TRUE |
| widthScale | width-scale | When position is "inline-start" or "inline-end", specifies the width of the component. | "l" | "m" | "s" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteSheetBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteSheetBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteSheetClose | Fires when the component is closed and animation is complete. |
| calciteSheetOpen | Fires when the component is open and animation is complete. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_sheet()
Create a Calcite Shell Layout
Description
The Shell is a foundational layout component in Calcite, enabling the creation of rich, interactive experiences. It provides structured slots for headers, footers, side panels, and main content.
Usage
calcite_shell(
...,
header = NULL,
footer = NULL,
panel_start = NULL,
panel_end = NULL,
panel_top = NULL,
panel_bottom = NULL,
modals = NULL,
dialogs = NULL,
alerts = NULL,
sheets = NULL
)
Arguments
... |
Main content to display in the default slot (between panels) |
header |
Content for the header slot (top of shell). Typically a
|
footer |
Content for the footer slot (bottom of shell) |
panel_start |
Content for the start/left panel. Typically a
|
panel_end |
Content for the end/right panel. Typically a
|
panel_top |
Content for the top panel (below header) |
panel_bottom |
Content for the bottom panel (above footer) |
modals |
Slot for |
dialogs |
Slot for |
alerts |
Slot for |
sheets |
Slot for |
Details
Shell Structure
The shell organizes your application into distinct regions:
-
header: Top navigation bar
-
panel-start/panel-end: Side panels (left/right)
-
panel-top/panel-bottom: Top/bottom panels
-
Default content: Main application area (maps, charts, etc.)
-
footer: Bottom information/links
-
Overlay slots: modals, dialogs, alerts, sheets
When embedded within other content, the overlay slots (modals, dialogs, alerts, sheets) facilitate placement of these components relative to the Shell, constraining them to the shell's boundaries rather than the full page.
Value
An object of class calcite_component which is a subclass of shiny.tag
References
Examples
# Basic shell with header and content
calcite_shell(
header = calcite_navigation(
calcite_navigation_logo(slot = "logo", heading = "My App")
),
"Main content goes here"
)
# Shell with sidebar panel
calcite_shell(
panel_start = calcite_shell_panel(
calcite_panel(heading = "Layers")
),
calcite_panel(heading = "Map View")
)
Create a ShellCenterRow component
Description
Use the calcite-shell-panel component instead.
Usage
calcite_shell_center_row(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| detached | detached | When true, the content area displays like a floating panel. | boolean | TRUE |
| heightScale | height-scale | Specifies the maximum height of the component. | "l" | "m" | "s" | TRUE |
| position | position | Specifies the component's position. Will be flipped when the element direction is right-to-left ("rtl"). | "end" | "start" | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding content to the calcite-shell-panel. |
| action-bar | A slot for adding a calcite-action-bar to the calcite-shell-panel.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_shell_center_row()
Create a Calcite Shell Panel Component
Description
Shell Panel is a layout container that slots into calcite_shell() via
panel_start or panel_end. It sits adjacent to or on top of the main
content area. Pass a calcite_panel() (typically containing calcite_block()
components) as the default content, and optionally a calcite_action_bar()
in the action_bar slot.
Usage
calcite_shell_panel(
...,
collapsed = NULL,
display_mode = NULL,
height = NULL,
message_overrides = NULL,
resizable = NULL,
width = NULL,
action_bar = NULL
)
Arguments
... |
Default slot content. Typically a single |
collapsed |
When |
display_mode |
Specifies the display mode:
|
height |
Specifies the component's height. |
message_overrides |
Override individual strings used by the component. |
resizable |
When |
width |
Specifies the component's width: |
action_bar |
Content for the |
Details
Usage
Shell Panel is the recommended wrapper when placing panels inside
calcite_shell()'s panel_start or panel_end slots. It controls display
mode, width, collapsibility, and action bar placement.
Multiple Shell Panels can be open simultaneously, unlike calcite_sheet().
It does not provide a page-blocking scrim and is not intended to interrupt
the main application workflow.
Value
An object of class calcite_component
References
Examples
calcite_shell(
panel_start = calcite_shell_panel(
calcite_panel(
heading = "Layers",
calcite_block(
heading = "Options",
collapsible = TRUE,
expanded = TRUE
)
)
),
calcite_panel(heading = "Map View")
)
Create a Calcite Slider Component
Description
Creates a slider input for selecting numeric values. Supports both single-value and range selection (dual handles).
Usage
calcite_slider(
id = NULL,
value = NULL,
min = 0,
max = 100,
step = 1,
min_value = NULL,
max_value = NULL,
label_handles = NULL,
label_ticks = NULL,
label_text = NULL,
ticks = NULL,
disabled = NULL,
required = NULL,
scale = NULL,
snap = NULL,
precise = NULL,
mirrored = NULL,
fill_placement = NULL,
histogram = NULL,
histogram_stops = NULL,
group_separator = NULL,
page_step = NULL,
min_label = NULL,
max_label = NULL,
name = NULL,
form = NULL,
numbering_system = NULL,
status = NULL,
validation_icon = NULL,
validation_message = NULL,
...
)
Arguments
id |
Component ID (required for Shiny reactivity) |
value |
Initial value (for single slider) or NULL |
min |
Minimum selectable value (default: 0) |
max |
Maximum selectable value (default: 100) |
step |
Increment step for up/down arrows and keyboard (default: 1) |
min_value |
For range sliders, the lower bound value |
max_value |
For range sliders, the upper bound value |
label_handles |
Whether to display numeric labels on handles (default: FALSE) |
label_ticks |
Whether to display numeric labels on tick marks (default: FALSE) |
label_text |
Accessible label text for the component |
ticks |
Interval for displaying tick marks on the number line |
disabled |
Whether the slider is disabled (default: FALSE) |
required |
Whether a value is required for form submission (default: FALSE) |
scale |
Size of the slider: "s" (small), "m" (medium), or "l" (large) |
snap |
Whether to enable snap-to-step on mouse interaction (default: FALSE) |
precise |
Whether to use finer positioning for handles (default: FALSE) |
mirrored |
Whether to mirror the slider (default: FALSE) |
fill_placement |
Where to display the fill: "start", "end", or "none" |
histogram |
A 2-column numeric matrix or data.frame for histogram display |
histogram_stops |
Color stops for histogram display |
group_separator |
Whether to display thousand separators in numbers (default: FALSE) |
page_step |
Interval to move with Page Up/Down keys |
min_label |
Accessible label for the minimum handle (for screen readers) |
max_label |
Accessible label for the maximum handle (for screen readers) |
name |
Name attribute for form submission |
form |
Associated form element ID |
numbering_system |
Numbering system to use: "arab", "arabext", or "latn" |
status |
Validation state: "idle", "valid", or "invalid" |
validation_icon |
Icon to display for validation feedback |
validation_message |
Message displayed for validation feedback |
... |
Additional attributes passed to the component |
Details
Shiny Integration
The slider emits two types of events:
-
calciteSliderChange- Fires when the user releases the handle (debounced, final value) -
calciteSliderInput- Fires continuously during drag (use with caution for expensive operations)
Available properties in input$id:
-
$value- Current value (single slider) or array of[minValue, maxValue](range slider) -
$min/$max- Slider bounds -
$step- Step increment -
$disabled- Whether disabled Other component properties
Single-value slider:
observeEvent(input$my_slider, {
current_value <- input$my_slider$value
print(paste("Slider value:", current_value))
})
Range slider (dual handles):
# Provide both min_value and max_value to create a range slider
calcite_slider(
id = "range_slider",
min = 0,
max = 100,
min_value = 20,
max_value = 80
)
observeEvent(input$range_slider, {
lower <- input$range_slider$minValue
upper <- input$range_slider$maxValue
print(paste("Range:", lower, "to", upper))
})
Update from server:
# Update single value
update_calcite("my_slider", value = 50)
# Update range
update_calcite("range_slider", minValue = 30, maxValue = 70)
Value
An object of class calcite_component
References
Examples
# Basic slider
calcite_slider(
id = "my_slider",
value = 50,
min = 0,
max = 100,
step = 5
)
# Slider with ticks and labels
calcite_slider(
id = "temperature",
value = 72,
min = 32,
max = 212,
step = 1,
ticks = 10,
label_handles = TRUE,
label_ticks = TRUE
)
# Range slider (dual handles)
calcite_slider(
id = "price_range",
min = 0,
max = 1000,
min_value = 100,
max_value = 500,
step = 10,
label_handles = TRUE
)
# Shiny example
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_card(
heading = "Slider Example",
calcite_label(
"Choose a value",
calcite_slider(
id = "my_slider",
value = 50,
min = 0,
max = 100,
step = 5,
label_handles = TRUE
)
),
verbatimTextOutput("slider_value")
)
)
server <- function(input, output, session) {
output$slider_value <- renderPrint({
paste("Current value:", input$my_slider$value)
})
}
shinyApp(ui, server)
}
Create a SplitButton component
Description
Create a SplitButton component
Usage
calcite_split_button(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| appearance | appearance | Specifies the appearance style of the component. | "outline" | "outline-fill" | "solid" | "transparent" | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| dropdownIconType | dropdown-icon-type | Specifies the icon used for the dropdown menu. | "caret" | "chevron" | "ellipsis" | "overflow" | TRUE |
| dropdownLabel | dropdown-label | Accessible name for the dropdown menu. | string | TRUE |
| flipPlacements | NA | Specifies the component's fallback slotted content placement when it's initial or specified placement has insufficient space available. | Check API reference | FALSE |
| kind | kind | Specifies the kind of the component, which will apply to border and background, if applicable. | "brand" | "danger" | "inverse" | "neutral" | TRUE |
| loading | loading | When true, a busy indicator is displayed on the primary button. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Determines where the component will be positioned relative to the container element. | "bottom" | "bottom-end" | "bottom-start" | "top" | "top-end" | "top-start" | TRUE |
| primaryIconEnd | primary-icon-end | Specifies an icon to display at the end of the primary button. | string | TRUE |
| primaryIconFlipRtl | primary-icon-flip-rtl | Displays the primaryIconStart and/or primaryIconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| primaryIconStart | primary-icon-start | Specifies an icon to display at the start of the primary button. | string | TRUE |
| primaryLabel | primary-label | Accessible name for the primary button. | string | TRUE |
| primaryText | primary-text | Text displayed in the primary button. | string | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| width | width | Check API reference | "auto" | "full" | "half" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteSplitButtonPrimaryClick | Fires when the primary button is clicked. |
| calciteSplitButtonSecondaryClick | Fires when the dropdown menu is clicked. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-dropdown content.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_split_button()
Create a Stepper component
Description
Create a Stepper component
Usage
calcite_stepper(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| icon | icon | When true, displays a status icon in the calcite-stepper-item heading. | boolean | TRUE |
| layout | layout | Defines the layout of the component. | "horizontal" | "horizontal-single" | "vertical" | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| numbered | numbered | When true, displays the step number in the calcite-stepper-item heading. | boolean | TRUE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItem | NA | Specifies the component's selected item. | HTMLCalciteStepperItemElement | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteStepperChange | Fires when the active calcite-stepper-item changes. |
| calciteStepperItemChange | Fires when the active calcite-stepper-item changes.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-stepper-item elements.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_stepper()
Create a StepperItem component
Description
Create a StepperItem component
Usage
calcite_stepper_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| complete | complete | When true, the step has been completed. | boolean | TRUE |
| description | description | A description for the component. Displays below the header text. | string | FALSE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| error | error | When true, the component contains an error that requires resolution from the user. | boolean | TRUE |
| heading | heading | The component header text. | string | FALSE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | boolean | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteStepperItemSelect | Fires when the active calcite-stepper-item changes.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding custom content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_stepper_item()
Create a Calcite Switch Component
Description
Creates a switch component for "on" and "off" choices. Switches should be used for boolean choices and can be useful for opt-in and additive actions.
Usage
calcite_switch(
id = NULL,
checked = NULL,
disabled = NULL,
form = NULL,
label = NULL,
label_text_end = NULL,
label_text_start = NULL,
name = NULL,
scale = NULL,
value = NULL,
...
)
Arguments
id |
Optional ID for the switch (required for Shiny reactivity) |
checked |
When TRUE, the component is checked |
disabled |
When TRUE, interaction is prevented and the component is displayed with lower opacity |
form |
The id of the form that will be associated with the component |
label |
Accessible name for the component |
label_text_end |
When provided, displays label text at the end of the component |
label_text_start |
When provided, displays label text at the start of the component |
name |
Specifies the name of the component. Required to pass the component's value on form submission |
scale |
Specifies the size of the component: "s" (small), "m" (medium), or "l" (large) |
value |
The component's value |
... |
Additional attributes passed to the component |
Details
Shiny Integration
When used in a Shiny app, calcite_switch() returns a reactive list containing
all component properties. You can observe the entire component state or watch
individual properties:
Available properties:
-
$checked- Whether the switch is currently checked (on/off) -
$disabled- Whether the switch is disabled -
$value- The switch's value -
$name- The component's name Other component properties
Usage in server:
# Watch for changes to the switch
observeEvent(input$my_switch, {
print(paste("Switch is:", if(input$my_switch$checked) "ON" else "OFF"))
})
# Access the checked state directly
observeEvent(input$my_switch$checked, {
if (input$my_switch$checked) {
print("Switch turned ON")
} else {
print("Switch turned OFF")
}
})
Value
An object of class calcite_component
References
Examples
# Basic switch
calcite_switch(
id = "my_switch",
label = "Enable 3D mode"
)
# Switch with label text on both sides
calcite_switch(
id = "theme_switch",
label_text_start = "Light",
label_text_end = "Dark",
label = "Theme toggle"
)
# Checked switch at large scale
calcite_switch(
checked = TRUE,
scale = "l",
label = "Notifications"
)
# Shiny example
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_panel(
heading = "Switch Example",
calcite_label(
layout = "inline",
"3D Off",
calcite_switch(id = "mode_switch"),
"3D On"
),
verbatimTextOutput("status")
)
)
server <- function(input, output, session) {
# Display switch state
output$status <- renderPrint({
input$mode_switch
})
}
shinyApp(ui, server)
}
Create a Tab component
Description
Create a Tab component
Usage
calcite_tab(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| selected | selected | When true, the component's contents are selected. Only one tab can be selected within the calcite-tabs parent. | boolean | TRUE |
| tab | tab | Specifies a unique name for the component. When specified, use the same value on the calcite-tab-title. | string | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding custom content. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tab()
Create a TabNav component
Description
Create a TabNav component
Usage
calcite_tab_nav(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| position | position | Specifies the position of calcite-tab-nav and calcite-tab-title components in relation to, and is inherited from the parent calcite-tabs, defaults to top. @internal | "bottom" | "top" | FALSE |
| selectedTitle | NA | Specifies the component's selected calcite-tab-title. | HTMLCalciteTabTitleElement | FALSE |
| storageId | storage-id | Specifies the name when saving selected calcite-tab data to localStorage. | string | TRUE |
| syncId | sync-id | Specifies text to update multiple components to keep in sync if one changes. | string | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTabChange | Emits when the selected calcite-tab changes.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-tab-titles.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tab_nav()
Create a TabTitle component
Description
Tab-titles are optionally individually closable.
Usage
calcite_tab_title(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closable | closable | When true, a close button is added to the component. | boolean | TRUE |
| closed | closed | When true, does not display or position the component. | boolean | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | TRUE |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| position | position | Specifies the position of calcite-tab-nav and calcite-tab-title components in relation to, and is inherited from the parent calcite-tabs, defaults to top. @internal | "bottom" | "top" | FALSE |
| selected | selected | When true, the component and its respective calcite-tab contents are selected. Only one tab can be selected within the calcite-tabs parent. | boolean | TRUE |
| tab | tab | Specifies a unique name for the component. When specified, use the same value on the calcite-tab. | string | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTabsActivate | Fires when a calcite-tab is selected. |
| calciteTabsClose | Fires when a calcite-tab is closed.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tab_title()
Create a Calcite Table Component
Description
Creates a table component from a data.frame with automatic row and cell generation. The table provides pagination, numbering, and various styling options.
Usage
calcite_table(
data,
...,
id = NULL,
caption,
header = NULL,
alignment = "start",
bordered = NULL,
numbered = NULL,
page_size = NULL,
scale = NULL,
striped = NULL,
numbering_system = NULL
)
Arguments
data |
A data.frame to display in the table (required) |
... |
Additional attributes passed to the component |
id |
Component ID (required for Shiny reactivity) |
caption |
Accessible title for the table (required) |
header |
Custom header row created with |
alignment |
Alignment for all cells: "start", "center", or "end" (default: "start") |
bordered |
When TRUE, displays borders (default: FALSE) |
numbered |
When TRUE, displays row numbers (default: FALSE) |
page_size |
Page size for pagination. When > 0, renders pagination controls (default: 0) |
scale |
Size of the component: "s" (small), "m" (medium), or "l" (large) (default: "m") |
striped |
When TRUE, displays striped styling (default: FALSE) |
numbering_system |
Unicode numeral system: "arab", "arabext", or "latn" |
Details
Shiny Integration
The table emits events for page changes and selection changes (when selection is enabled).
Available properties in input$id:
-
$pageSize- Current page size -
$scale- Component scale -
$bordered- Whether borders are displayed -
$numbered- Whether row numbers are displayed -
$striped- Whether striped styling is applied Other component properties
Events:
-
calciteTablePageChange- Fires when the page changes
Value
An object of class calcite_component
References
Examples
# Basic table from data frame
calcite_table(
data = mtcars[1:5, 1:4],
id = "my_table",
caption = "Motor Trend Car Data",
bordered = TRUE,
striped = TRUE
)
# Table with pagination
calcite_table(
data = iris,
id = "iris_table",
caption = "Iris Dataset",
page_size = 10,
numbered = TRUE
)
# Table with custom headers
calcite_table(
data = mtcars[1:5, 1:3],
caption = "Cars",
header = list(
calcite_table_header(heading = "Miles/Gallon", description = "Fuel efficiency"),
calcite_table_header(heading = "Cylinders", description = "Number of cylinders"),
calcite_table_header(heading = "Displacement", description = "Engine size")
)
)
Create a Calcite Table Header
Description
Creates a header cell for use in calcite_table headers.
Usage
calcite_table_header(heading, description = NULL, alignment = "start")
Arguments
heading |
Header text to display |
description |
Optional description text below heading |
alignment |
Alignment: "start", "center", or "end" (default: "start") |
Value
A calcite-table-header tag
Examples
calcite_table_header(
heading = "Name",
description = "Person's full name"
)
Create a Tabs component
Description
Create a Tabs component
Usage
calcite_tabs(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| bordered | bordered | When true, the component will display with a folder style menu. | boolean | FALSE |
| layout | layout | Specifies the layout of the calcite-tab-nav, justifying the calcite-tab-titles to the start ("inline"), or across and centered ("center"). | "center" | "inline" | TRUE |
| position | position | Specifies the position of calcite-tab-nav and calcite-tab-title components in relation to the calcite-tabs. | "bottom" | "top" | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-tabs. |
| title-group | A slot for adding a calcite-tab-nav.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tabs()
Create a TextArea component
Description
Create a TextArea component
Usage
calcite_text_area(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| columns | columns | Specifies the component's number of columns. | number | TRUE |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| form | form | The id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any. | string | TRUE |
| groupSeparator | group-separator | When true, number values are displayed with a group separator corresponding to the language and country format. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| limitText | limit-text | Check API reference | boolean | TRUE |
| maxLength | max-length | When the component resides in a form, specifies the maximum number of characters allowed. | number | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| minLength | min-length | When the component resides in a form, specifies the minimum number of characters allowed. | number | TRUE |
| name | name | Specifies the name of the component. | string | TRUE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| placeholder | placeholder | Specifies the placeholder text for the component. | string | FALSE |
| readOnly | read-only | When true, the component's value can be read, but cannot be modified. | boolean | TRUE |
| required | required | When true and the component resides in a form, the component must have a value in order for the form to submit. | boolean | TRUE |
| resize | resize | Specifies if the component is resizable. | "both" | "horizontal" | "none" | "vertical" | TRUE |
| rows | rows | Specifies the component's number of rows. | number | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| status | status | Specifies the status of the input field, which determines message and icons. | "idle" | "invalid" | "valid" | TRUE |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | boolean | string | TRUE |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | FALSE |
| validity | NA | The current validation state of the component. | Check API reference | FALSE |
| value | value | The component's value. | string | FALSE |
| wrap | wrap | Specifies the wrapping mechanism for the text. | "hard" | "soft" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTextAreaChange | Fires each time a new value is typed and committed. |
| calciteTextAreaInput | Fires each time a new value is typed.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
| footer-start | A slot for adding content to the start of the component's footer. |
| footer-end | A slot for adding content to the end of the component's footer. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_text_area()
Create a Calcite Tile Component
Description
Tiles are presentational components useful for presenting consequential information in a compact, consistent format. They can contain supportive icons, a heading, and a description.
Usage
calcite_tile(
...,
id = NULL,
heading = NULL,
description = NULL,
icon = NULL,
href = NULL,
active = NULL,
selected = NULL,
disabled = NULL,
alignment = NULL,
scale = NULL,
icon_flip_rtl = NULL,
label = NULL,
content_top = NULL,
content_bottom = NULL
)
Arguments
... |
Child content for the tile |
id |
Optional ID for the tile (required for Shiny reactivity) |
heading |
The component header text |
description |
A description for the component, which displays below the heading |
icon |
Specifies an icon to display |
href |
When provided, the URL for the component (makes tile a link) |
active |
When TRUE, the component is active (default: FALSE) |
selected |
When TRUE and parent's selectionMode allows it, component is selected (default: FALSE) |
disabled |
When TRUE, interaction is prevented and component displays with lower opacity (default: FALSE) |
alignment |
Specifies alignment of tile's content: "start" or "center" |
scale |
Specifies size of the component: "s" (small), "m" (medium), or "l" (large) |
icon_flip_rtl |
When TRUE, icon will be flipped when element direction is RTL (default: FALSE) |
label |
Accessible name for the component |
content_top |
Slot for adding non-interactive elements above the component's content |
content_bottom |
Slot for adding non-interactive elements below the component's content |
Details
Best Practices
Tiles are best used to represent one of a limited number of options, actions, or choices
The component is wholly focusable - it should not contain slotted focusable elements
Text should be concise (heading max ~50 chars, description max ~175 chars)
Use sentence case for heading and description
End description with proper punctuation
Shiny Integration
When used in a Shiny app with an id, calcite_tile() returns a reactive list
containing component properties.
Available properties:
-
$active- Whether the tile is currently active -
$selected- Whether the tile is selected -
$disabled- Whether the tile is disabled -
$heading- The heading text -
$description- The description text -
$icon- The icon name Other component properties
Value
An object of class calcite_component
References
Examples
# Basic tile with icon and description
calcite_tile(
icon = "3d-glasses",
heading = "Special viewing glasses",
description = "Great for eclipses and optical illusions"
)
# Tile with content in bottom slot
calcite_tile(
icon = "rangefinder",
heading = "Rangefinder",
description = "A time-tested tool for field engineers",
content_bottom = calcite_chip("214 in use")
)
# Active tile with link
calcite_tile(
icon = "data",
heading = "Data Analysis",
href = "https://example.com/data",
active = TRUE
)
Create a Calcite Tile Group Component
Description
Tile Group can be used to organize multiple Tile components within a layout. It supports workflows and patterns using more than one Tile, with opt-in selection modes for interactive workflows.
Usage
calcite_tile_group(
...,
id = NULL,
label = NULL,
layout = NULL,
alignment = NULL,
scale = NULL,
selection_mode = NULL,
selection_appearance = NULL,
disabled = NULL
)
Arguments
... |
Child |
id |
Optional ID for the tile group (required for Shiny reactivity to track selection) |
label |
Accessible name for the component (required for accessibility) |
layout |
Defines the layout: "horizontal" for rows, "vertical" for a single column |
alignment |
Specifies alignment of each tile's content: "start" or "center" |
scale |
Specifies size of the component: "s" (small), "m" (medium), or "l" (large) |
selection_mode |
Specifies the selection mode: "none" (default), "single", "single-persist", or "multiple" |
selection_appearance |
Specifies selection appearance: "icon" (checkmark/dot) or "border" |
disabled |
When TRUE, interaction is prevented and component displays with lower opacity (default: FALSE) |
Details
Selection Modes
-
"none"- No selection allowed (default) -
"single"- Only one tile can be selected at a time -
"single-persist"- Only one tile selected, prevents de-selection -
"multiple"- Any number of tiles can be selected
Shiny Integration
When used in a Shiny app with an id, calcite_tile_group() returns a reactive
list containing component properties and emits events when selection changes.
Available properties:
-
$selectedItems- Array of selected tile IDs -
$selectionMode- Current selection mode -
$layout- Current layout -
$disabled- Whether the group is disabled Other component properties
Usage in server:
# Watch for selection changes
observeEvent(input$my_tile_group$selectedItems, {
selected <- input$my_tile_group$selectedItems
message("Selected tiles: ", paste(selected, collapse = ", "))
})
Value
An object of class calcite_component
References
Examples
# Basic tile group
calcite_tile_group(
label = "Role selection",
calcite_tile(
icon = "rangefinder",
heading = "Field operator",
description = "Create and edit Reports in the field"
),
calcite_tile(
icon = "knowledge-graph-dashboard",
heading = "Office coordinator",
description = "View and analyze Reports from the office"
)
)
# Tile group with multiple selection
calcite_tile_group(
id = "role_selector",
label = "Select roles",
selection_mode = "multiple",
selection_appearance = "border",
layout = "vertical",
calcite_tile(
id = "construction",
icon = "wrench",
heading = "Construction Worker",
description = "Manage construction projects and coordinate teams"
),
calcite_tile(
id = "engineer",
icon = "rangefinder",
heading = "Civil Engineer",
description = "Design infrastructure and ensure compliance"
)
)
Create a TimePicker component
Description
Create a TimePicker component
Usage
calcite_time_picker(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| hourFormat | hour-format | Specifies the component's hour format, where: "user" displays the user's locale format, "12" displays a 12-hour format, and "24" displays a 24-hour format. | "12" | "24" | "user" | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| numberingSystem | numbering-system | Specifies the Unicode numeral system used by the component for localization. | "arab" | "arabext" | "latn" | FALSE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| step | step | Specifies the granularity the value must adhere to (in seconds). | number | TRUE |
| value | value | The component's value in UTC (always 24-hour format). | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTimePickerChange |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_time_picker()
Create a Tip component
Description
Use the calcite-card, calcite-notice, calcite-panel, or calcite-tile component instead.
Usage
calcite_tip(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closed | closed | When true, the component does not display. | boolean | TRUE |
| closeDisabled | close-disabled | When true, the close button is not present on the component. | boolean | TRUE |
| heading | heading | The component header text. | string | FALSE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
| selected | selected | When true, the component is selected if it has a parent calcite-tip-manager. Only one tip can be selected within the calcite-tip-manager parent. | boolean | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTipDismiss | Emits when the component has been closed. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text and a hyperlink. |
| thumbnail | A slot for adding an HTML image element. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tip()
Create a TipGroup component
Description
Use the calcite-carousel and calcite-carousel-item components instead.
Usage
calcite_tip_group(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| groupTitle | group-title | The component header text for all nested calcite-tips. | string | FALSE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-tips.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tip_group()
Create a TipManager component
Description
Use the calcite-carousel and calcite-carousel-item components instead.
Usage
calcite_tip_manager(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closed | closed | When true, does not display or position the component. | boolean | TRUE |
| headingLevel | heading-level | Specifies the heading level of the component's heading for proper document structure, without affecting visual styling. | 1 | 2 | 3 | 4 | 5 | 6 | TRUE |
| messageOverrides | NA | Use this property to override individual strings used by the component. | Check API reference | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTipManagerClose | Emits when the component has been closed. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding calcite-tips.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tip_manager()
Create a Tooltip component
Description
Create a Tooltip component
Usage
calcite_tooltip(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| closeOnClick | close-on-click | Closes the component when the referenceElement is clicked. | boolean | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| offsetDistance | offset-distance | Offset the position of the component away from the referenceElement. | number | TRUE |
| offsetSkidding | offset-skidding | Offset the position of the component along the referenceElement. | number | TRUE |
| open | open | When true, the component is open. | boolean | TRUE |
| overlayPositioning | overlay-positioning | Determines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. The "fixed" value should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed". | "absolute" | "fixed" | TRUE |
| placement | placement | Determines where the component will be positioned relative to the referenceElement. | "auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start" | TRUE |
| referenceElement | reference-element | The referenceElement to position the component according to its "placement" value. Setting to the HTMLElement is preferred so the component does not need to query the DOM for the referenceElement. However, a string ID of the reference element can be used. | Element | VirtualElement | string | FALSE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTooltipBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. |
| calciteTooltipBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. |
| calciteTooltipClose | Fires when the component is closed and animation is complete. |
| calciteTooltipOpen | Fires when the component is open and animation is complete. |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tooltip()
Create a Tree component
Description
Create a Tree component
Usage
calcite_tree(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| lines | lines | When true, displays indentation guide lines. | boolean | TRUE |
| scale | scale | Specifies the size of the component. | "l" | "m" | "s" | TRUE |
| selectedItems | NA | Specifies the component's selected items. | Check API reference | FALSE |
| selectionMode | selection-mode | Specifies the selection mode of the component, where: "ancestors" displays with a checkbox and allows any number of selections from corresponding parent and child selections, "children" allows any number of selections from one parent from corresponding parent and child selections, "multichildren" allows any number of selections from corresponding parent and child selections, "multiple" allows any number of selections, "none" allows no selections, "single" allows one selection, and "single-persist" allows and requires one selection. | "ancestors" | "children" | "multichildren" | "multiple" | "none" | "single" | "single-persist" | TRUE |
Events
The following events are observed by shiny:
| Event | Description |
| calciteTreeSelect | Fires when the user selects/deselects calcite-tree-items.
|
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for calcite-tree-item elements.
|
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tree()
Create a TreeItem component
Description
Create a TreeItem component
Usage
calcite_tree_item(...)
Arguments
... |
named attributes passed to |
Details
Properties
The following properties are provided by this component:
| Name | Attribute | Description | Values | Reflects to Attribute |
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | TRUE |
| expanded | expanded | When true, the component is expanded. | boolean | TRUE |
| iconFlipRtl | icon-flip-rtl | When true, the icon will be flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | TRUE |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | TRUE |
| label | label | Accessible name for the component. | string | FALSE |
| selected | selected | When true, the component is selected. | boolean | TRUE |
Slots
The following slots are provided by this component:
| Slot | Description |
| Default (unnamed) | A slot for adding text. |
| children | A slot for adding nested calcite-tree elements. |
| actions-end | A slot for adding actions to the end of the component. It is recommended to use two or fewer actions. |
Value
an object of class calcite_component which is a subclass of shiny.tag
References
Examples
calcite_tree_item()
Calcite components version
Description
Reports the currently used calcite component version.
Usage
calcite_version()
Value
a character scalar
Examples
calcite_version()
Calcite examples
Description
Calcite examples
Usage
list_examples()
run_example(name)
open_example(name = NULL)
Arguments
name |
the example name (without |
Examples
list_examples()
if (interactive()) {
open_example()
run_example("calcite-checkbox")
}
Create a Shell with Action Bar Layout
Description
A convenience function that creates a common layout pattern: a shell with a navigation header, an action bar, and a side panel. This is ideal for map-based applications or tools with multiple layers/options.
Usage
page_actionbar(
...,
title = NULL,
header_actions = NULL,
actions = NULL,
panel_content = NULL,
panel_position = c("start", "end"),
panel_width = c("m", "s", "l"),
footer = NULL
)
Arguments
... |
Main content area (typically a map or primary view) |
title |
Application title shown in the navigation header |
header_actions |
Optional actions for the header (e.g., user menu, settings).
These will be placed in the |
actions |
A |
panel_content |
A |
panel_position |
Position of the panel: |
panel_width |
Width of the shell panel: |
footer |
Optional footer content |
Value
An object of class calcite_component containing a configured shell
Examples
page_actionbar(
title = "Wildlife Areas",
actions = calcite_action_bar(
calcite_action(text = "Add", icon = "plus"),
calcite_action(text = "Layers", icon = "layers", active = TRUE)
),
panel_content = calcite_panel(
heading = "Layers",
"Layer controls here"
),
"Map content here"
)
Create a Shell with Navigation Bar Layout
Description
A convenience function for creating a simple layout with a navigation header and main content area. This is ideal for dashboard-style applications.
Usage
page_navbar(..., title = NULL, logo = NULL, nav_actions = NULL, footer = NULL)
Arguments
... |
Main content area |
title |
Application title shown in the navigation header |
logo |
Optional logo component for the navigation |
nav_actions |
Optional actions for the navigation bar (placed in |
footer |
Optional footer content |
Value
An object of class calcite_component containing a configured shell
Examples
page_navbar(
title = "My Dashboard",
nav_actions = list(
calcite_action(icon = "gear", text = "Settings"),
calcite_action(icon = "sign-out", text = "Logout")
),
"Dashboard content here"
)
Create a Shell with Sidebar Panel Layout
Description
Similar to bslib::page_sidebar(), this creates a layout with a sidebar
panel and main content area — the easiest way to build a standard Calcite
app layout. Pass a calcite_panel() as sidebar; it will be wrapped in a
calcite_shell_panel() automatically.
Usage
page_sidebar(
...,
sidebar = NULL,
title = NULL,
position = c("start", "end"),
width = c("m", "s", "l"),
display_mode = c("dock", "overlay", "float-content", "float-all"),
footer = NULL
)
Arguments
... |
Main content area (typically a |
sidebar |
A |
title |
Optional application title shown in a navigation header. |
position |
Position of sidebar: |
width |
Width of the sidebar: |
display_mode |
Display mode for the shell panel: |
footer |
Optional footer content |
Value
An object of class calcite_component containing a configured shell
Examples
page_sidebar(
title = "Data Explorer",
sidebar = calcite_panel(
heading = "Filters",
calcite_block(
heading = "Options",
collapsible = TRUE,
expanded = TRUE
)
),
calcite_panel(heading = "Results")
)
Update Calcite Component Properties
Description
Updates the properties of the javascript Calcite component.
Usage
update_calcite(id, ..., session = shiny::getDefaultReactiveDomain())
Arguments
id |
the html ID of the element to update. Must be a character scalar. |
... |
named properties to be updated in the component. The names must match the property name. Otherwise, will fail silently. |
session |
a shiny session object. Default |
Value
NULL. Sends a message to the shiny session object.
Examples
# this cannot work outside of shiny
if (interactive()) {
library(shiny)
ui <- calcite_shell(
calcite_card(
heading = "Content",
calcite_label(
layout = "inline",
calcite_checkbox(id = "checked"),
"Click me"
)
),
calcite_notice(
id = "initial-note",
div(slot = "title", "Nice!"),
div(slot = "message", "This is a success message")
)
)
server <- function(input, output, session) {
observeEvent(input$checked_checked, {
checked <- input$checked_checked$values
# Update the `initial-note` property here
update_calcite("initial-note", open = checked)
})
}
# shinyApp(ui, server)
}