Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,25 @@ Use input tooltips conservatively. Add them only when a control represents a non
- Give icon-only triggers a short accessible `title`.
- Add a small spacing utility such as `class = "ms-1"` so the icon remains visually separate from the label.
- Support hover, keyboard focus, and click/touch with `options = list(trigger = "hover focus click")`.
- Use a light tooltip theme with a white background, dark text, and a subtle border or shadow.
- Test the icon at normal and narrow widths and verify the interaction directly in the running app.

Configure the light tooltip appearance once in the app theme:

```r
apptheme <- bs_theme(
"tooltip-bg" = "$white",
"tooltip-color" = "$body-color",
"tooltip-opacity" = 1
) |>
bs_add_rules(
".tooltip-inner {
border: 1px solid $border-color;
box-shadow: $box-shadow-sm;
}"
)
```

Use this pattern, adapting the outer wrapper to the existing label:

```r
Expand Down
12 changes: 11 additions & 1 deletion lorenz-attractor/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ library(markdown)
library(shinyWidgets)

# theme options -----------------------------------------------------------
apptheme <- bs_theme()
apptheme <- bs_theme(
"tooltip-bg" = "$white",
"tooltip-color" = "$body-color",
"tooltip-opacity" = 1
) |>
bs_add_rules(
".tooltip-inner {
border: 1px solid $border-color;
box-shadow: $box-shadow-sm;
}"
)

sidebar <- purrr::partial(bslib::sidebar, width = 300)

Expand Down
Loading