insightsengineering / insightsengineering/teal

[Feature Request]: Extend the header and footer for teal to include interactive elements

Open
#1,429 1 comment 0 reactions 0 assignees View on GitHub
core enhancement TrackB_RMedicine_Hackathon_Apr2026
Dominant language
R
Stars
263
Forks
59
Avg merge
5d 17h
Merged PRs (30d)
5

Description

### Feature description

Currently, it is not easy to create header and footer with custom server logic, one can only create static header and footers in teal easily.

The way to make them interactive is to manually modify the server function like this:
```r
library(teal)

app <- init(
data = teal_data(IRIS = iris, MTCARS = mtcars),
modules = modules(example_module()),
header = tags$div(actionButton("click_me", "Click Me!"), textOutput("click_count")),
footer = tags$div("Static footer")
)

body(app$server)[[length(body(app$server)) + 1]] <- quote(
output$click_count <- renderText({
paste("You clicked the button", input$click_me, "times")
})
)

shinyApp(app$ui, app$server)
```

It will be nice if we can provide the server logic in an easy way so we can create header and footers with interactivity.

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct.

### Contribution Guidelines

- [X] I agree to follow this project's Contribution Guidelines.

### Security Policy

- [X] I agree to follow this project's Security Policy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.