openui / openui/open-ui

switch: What customizability for animations should be supported?

Open
#816 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage switch
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

I am interested in nailing down what the use cases for <switch> are.
It seems like rendering content on top of the two sides of the track and the thumb are important.

In @gfellerph's new switch explainer I saw this:

Findings (from 44 analyzed Design Systems):

  • 70% of Design Systems don’t display any content inside their switches
  • 30% display content on the track
  • 18% display content on the thumb
  • 88% use the background color transition animation
  • 16% use a track slide animation

For the "background color transition animation" and "track slide animation", does the design system allow the developer to customize the animation itself? Or does it just mean that the design system has an animation that is not customizable?

I am sure that <switch> will have an animation by default for these things, but do we need to provide developer controls to change how they work?

Contributor guide

Open the contributing guide

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.

Research direction

Start with @gfellerph's switch explainer and its analysis of 44 design systems. Clarify whether background-color transitions and track-slide animations need developer controls, alongside content on the track and thumb. Done means the switch requirements and supported customization options are agreed and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.