How to insert icons in a message in a shiny app

Can you help me adjust the text that is being displayed in the shiny app and also insert two icons, as per the attached image?. Regarding the text, I could increase the font a little, and regarding the icons: look at the image that has two icons, one for the message and other for the contact phone number. I would like, if possible, those same or similar icons.

library(shiny)
library(shinythemes)

ui <- fluidPage(
  
  shiny::navbarPage(theme = shinytheme("flatly"), collapsible = TRUE,
                    br(),
                    tabPanel("Contact",
                             icon = icon("support"),
                             sidebarLayout(
                               sidebarPanel(
                               ),
                               wellPanel(
                                 includeMarkdown("README.md")
                                 
                               )
                             )
                    )))

server <- function(input, output,session) {
  
  
}

shinyApp(ui = ui, server = server)

README.md

# **CONTACT**

Feel free to contact us through any of our communication channels.

Any comments, questions or suggestions are most welcome.

Channels:

teste@gmail.com.

(55) 9999-9999

How it turned out:

enter image description here

Example:

enter image description here

HI,

The easiest way is to use the fontawesome library in RMarkdown, then knit the file to HTML and use that file in your app.

RMarkdown file - contactInfo.Rmd

---
output: html_document
---

```{r include=FALSE}
library(fontawesome)

```

# **CONTACT**

Feel free to contact us through any of our communication channels.

Any comments, questions or suggestions are most welcome.

Channels:

`r fa("envelope", fill = "brown")` teste@gmail.com.

`r fa("whatsapp", fill = "brown")` (55) 9999-9999

Don't forget to Knit the markdown to html first!

Shiny app

library(shiny)

ui <- navbarPage("My Page",
                 tabPanel("Contact",
                    includeHTML("contactInfo.html")
                 )
)

server <- function(input, output,session) {
  
}

shinyApp(ui = ui, server = server)

image

Hope this helps,
PJ

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.