JohnCoene / tippy

💬 Tippy.js for Shiny
http://tippy.john-coene.com/
Other
76 stars 2 forks source link

How to make tippy popup box bigger? #13

Closed mj-at-qb closed 3 years ago

mj-at-qb commented 3 years ago

As mentioned here, when there are enough lines of text, the popup box will not fit around them all and the text overflows. Additionally, when the popup box reaches it max height/width, 2 of the corners are rounded. My main question: Is there a way to force the popup box to contain all text? Side question: is it possible to overwrite the rounded corners?

Thanks in advance for any help.

JohnCoene commented 3 years ago

With the latest version (from Github) you can use maxWidth.

library(shiny)
library(tippy)

ui <- fluidPage(
  useTippy(),
  p("Another tooltip", id = "tip"),
  tippyThis(
    "tip",
    maxWidth = 800, # max width of tooltip in pixels
    "This is indeed an extremely long tooltip with way, way too much text but should display on a single line."
  )
)

server <- function(input, output) {}

shinyApp(ui, server)

Sorry for the late response.

mj-at-qb commented 3 years ago

No worries on the delay. Thanks for the help!