Skip to content

[Bug]: ui.tooltip kwarg "options" does not work #2096

@ambevill

Description

@ambevill

Component

UI (ui.*)

Severity

P2 - Medium (workaround exists)

Shiny Version

1.5.0

Python Version

3.11.0

Minimal Reproducible Example

from shiny import App, render, ui
import json

app_ui = ui.page_fluid(
    ui.tooltip(
        ui.input_action_button("btn1", "uses options=..."),
        "A message",
        id="btn_tooltip1",
        placement="right",
        options=dict(offset = [0, 100]),
    ),
    ui.tooltip(
        ui.input_action_button("btn2", "uses bsOptions=..."),
        "A message",
        id="btn_tooltip2",
        placement="right",
        bsOptions=json.dumps(dict(offset = [0, 100])),
    ),
    ui.output_text_verbatim("text"),
)

def server(input, output, session):
    @render.text
    def text():
        return f"Tooltip state: {input.btn_tooltip1()} {input.btn_tooltip2()}"

app = App(app_ui, server)

#app.run()

Behavior

Current: passing options to ui.tooltip has no effect.

Expected: the options are used as described in the Bootstrap doc as promised in the py-shiny doc

Error Messages (if any)

No errors

Environment

OS: Windows 11
Browser: Edge 141.0.3537.57 x64
Dependencies (sorry, not a minimal set):

adbc-driver-manager==1.7.0
adbc-driver-sqlite==1.7.0
anyio==4.6.0
anywidget==0.9.18
appdirs==1.4.4
asgiref==3.8.1
asttokens==2.4.1
async-timeout==5.0.1
attrs==24.2.0
babel==2.16.0
blinker==1.8.2
certifi==2025.6.15
cffi==1.17.1
charset-normalizer==3.3.2
choreographer==1.0.9
click==8.1.7
colorama==0.4.6
comm==0.2.2
connectorx==0.4.4
contourpy==1.3.0
cycler==0.12.1
dash==2.18.1
dash-bootstrap-components==1.6.0
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
dash_ag_grid==31.2.0
debugpy==1.8.2
decorator==5.1.1
docxcompose==1.4.0
docxtpl==0.20.0
et-xmlfile==1.1.0
executing==2.1.0
faicons==0.2.2
fastexcel==0.14.0
fastjsonschema==2.20.0
Flask==3.0.3
fonttools==4.54.1
gitdb==4.0.11
GitPython==3.1.43
greenlet==3.1.1
h11==0.14.0
hatchling==1.27.0
htmltools==0.6.0
idna==3.10
importlib_metadata==8.5.0
importlib_resources==6.5.2
iniconfig==2.0.0
ipykernel==6.29.5
ipython==8.18.0
ipython_pygments_lexers==1.1.1
ipywidgets==8.1.5
itables==2.3.0
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.6
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyterlab_widgets==3.0.13
kaleido==1.0.0
kiwisolver==1.4.7
linkify-it-py==2.0.3
logistro==1.1.0
lxml==5.3.0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.10.3
matplotlib-inline==0.1.7
maturin==1.7.4
mdit-py-plugins==0.4.2
mdurl==0.1.2
narwhals==1.45.0
nbformat==5.10.4
nest-asyncio==1.6.0
numpy==2.3.1
openpyxl==3.1.5
orjson==3.10.18
outcome==1.3.0.post0
packaging==25.0
pandas==2.2.3
parso==0.8.4
pathspec==0.12.1
pillow==10.4.0
platformdirs==4.2.2
plotly==6.2.0
pluggy==1.5.0
polars==1.17.1
prompt-toolkit==3.0.36
psutil==6.0.0
psygnal==0.11.1
pure_eval==0.2.3
pyarrow==20.0.0
pybind11==2.13.6
pycparser==2.22
Pygments==2.18.0
pyodbc==5.2.0
pyparsing==3.1.4
PySocks==1.7.1
pytest==8.4.1
python-dateutil==2.9.0.post0
python-docx==1.2.0
python-multipart==0.0.12
pytz==2025.2
pywin32==310
pyzmq==26.0.3
questionary==2.0.1
referencing==0.35.1
requests==2.32.3
retrying==1.3.4
rpds-py==0.21.0
rpy2==3.6.1
rpy2-rinterface==3.6.1
rpy2-robjects==3.6.1
satk @ file:///C:/Users/bevilla/projects/satk
satk_cpp==0.0.31
scipy==1.16.0
seaborn==0.13.2
selenium==4.35.0
shiny==1.5.0
shinychat==0.2.8
shinywidgets==0.3.3
simplejson==3.19.3
six==1.16.0
smmap==5.0.1
sniffio==1.3.1
sortedcontainers==2.4.0
SQLAlchemy==2.0.41
stack-data==0.6.3
starlette==0.39.2
tenacity==9.0.0
tomlkit==0.13.3
tornado==6.4.1
traitlets==5.14.3
trio==0.30.0
trio-websocket==0.12.2
trove-classifiers==2025.5.9.12
typing_extensions==4.14.1
tzdata==2024.2
tzlocal==5.2
uc-micro-py==1.0.3
urllib3==2.5.0
uv==0.7.2
uvicorn==0.31.0
watchfiles==0.24.0
wcwidth==0.2.13
websocket-client==1.8.0
websockets==13.1
Werkzeug==3.0.4
widgetsnbextension==4.0.13
wsproto==1.2.0
xlsxwriter==3.2.9
zipp==3.20.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions