Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tabs] Consolidate the "active" element API #1074

Open
vladmoroz opened this issue Dec 12, 2024 · 0 comments
Open

[tabs] Consolidate the "active" element API #1074

vladmoroz opened this issue Dec 12, 2024 · 0 comments
Labels
breaking change component: tabs This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@vladmoroz
Copy link
Contributor

vladmoroz commented Dec 12, 2024

Tabs uses a mix of "selected" and "active" language in the API:

  • data-selected attribute
  • data-activation-direction attribute
  • --active-tab-bottom, --active-tab-height, etc
  • activateOnFocus prop

Option 1
Converge with the Select component on "selected":

  • data-selected
  • --selected-tab-bottom, --selected-tab-height
  • selectOnFocus

Option 2
Use "active" language as it might sound more natural:

  • data-active
  • --active-tab-bottom, --active-tab-height
  • activateOnFocus

We could consider using active for Toggle instead of pressed as that one kind of sticks out too, and doesn't make sense with selected

Search keywords:

@vladmoroz vladmoroz added component: tabs This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! breaking change labels Dec 12, 2024
@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed component: tabs This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! breaking change labels Dec 12, 2024
@vladmoroz vladmoroz added component: tabs This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! breaking change labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: tabs This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant