Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How to pass information into the ellipsis argument of the widget's custom HTML function?

Open
#482 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
documentation

Research direction

Start with the custom widget HTML documentation and the createWidget call shown in the issue. Trace how the big argument could reach WIDGETNAME_html before JavaScript, and confirm the supported behavior or document the limitation and intended usage.

Written by the indexing model from the issue text.

Description

The documentation shows that it's possible to create a custom HTML container for a widget:

WIDGETNAME_html <- function(id, style, class, ...){
  tags$span(id = id, class = class)
}

How can I, as the widget developer, pass information into the ellipsis argument?

More specifically, suppose I have the following widget definition:

MYWIDGET <- function(data, big = TRUE) {
  javascript_data = list()
  htmlwidgets::createWidget(name = 'MYWIDGET', x = javascript_data, width = 400, height = 400, big = big)
}

I would want the big argument to be passed to the custom HTML constructor so that I can add an HTML class to the tag. I know I can pass the information into the x parameter, and then deal with it from javascript, but I want to know how to access a variable in the widget's html construction before it gets into the javascript layer.

Dominant language
R
Stars
801
Forks
203
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ramnathv/htmlwidgets

All issues in ramnathv/htmlwidgets

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.