Skip to content

Allow type="color" in dcc.Input - #4115

Open
budescode wants to merge 2 commits into
plotly:devfrom
budescode:input-type-color
Open

budescode wants to merge 2 commits into
plotly:devfrom
budescode:input-type-color

Conversation

@budescode

@budescode budescode commented Nov 3, 2026 •

Copy link
Copy Markdown

dcc.Input(type="color") was rejected because color was not in the allowed list of input types.

This adds color to the HTMLInputTypes enum in types.ts. The Python class, its docstring, and the prop check are generated from that enum, so that one line is the whole fix. The existing debounce prop covers the concern about the callback firing on every change while dragging in the picker.

Screen.Recording.2026-11-03.at.9.43.37.PM.mov

Fixes #2772.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Add color to HTMLInputTypes
    • Add integration test test_inbs005_color_type (fails before the change, passes after)
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@AnnMarieW

Copy link
Copy Markdown
Collaborator

LGTM 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dcc.Input type="color" raises error

2 participants