MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TabPanel

Function TabPanel

starters/hooks/src/Tabs.tsx:97–111  ·  view source on GitHub ↗
({state, ...props}: {state: TabListState<object>})

Source from the content-addressed store, hash-verified

95}
96
97function TabPanel({state, ...props}: {state: TabListState<object>}) {
98 let ref = useRef<HTMLDivElement>(null);
99 let {tabPanelProps} = useTabPanel(props, state, ref);
100 let {focusProps, isFocusVisible} = useFocusRing();
101
102 return (
103 <div
104 {...mergeProps(tabPanelProps, focusProps)}
105 ref={ref}
106 className="react-aria-TabPanel"
107 data-focus-visible={isFocusVisible || undefined}>
108 {state.selectedItem?.props.children}
109 </div>
110 );
111}

Callers

nothing calls this directly

Calls 3

useFocusRingFunction · 0.90
mergePropsFunction · 0.90
useTabPanelFunction · 0.85

Tested by

no test coverage detected