[Tabs] Missing width/height state in Tabs.Indicator
render callback
#1286
Labels
component: tabs
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
Feature request
Summary
The
Tabs.Indicator
element exposes the following CSS vars in order to let users style/animate the element:The
state
argument in therender
callback of theTabs.Indicator
component includes aselectedTabPosition
object which contains{top, right, bottom , left}
. These coordinates correspond to the first four CSS vars, but--active-tab-width
and--active-tab-height
have no corresponding state keys.Motivation
Some users might need to access the width/height of the selected tab in JS. For example, it's useful if someone is relying on Motion to animate the tabs indicator. See this example: https://codesandbox.io/p/sandbox/black-platform-4zphr8?workspaceId=ws_HE9JRzFW36Y2kpBoSwdvZ5. The coordinates of the tabs indicator can be animated using Motion but not the width because width/height is not exposed in the
render
callback state.Further context: https://discord.com/channels/1287292451308048406/1287292451308048409/1325583630956888135
The text was updated successfully, but these errors were encountered: