import * as React from 'react'; import Tabs from '@mui/joy/Tabs'; import TabList from '@mui/joy/TabList'; import Tab from '@mui/joy/Tab'; export default function TabsSticky() { const [sticky, setSticky] = React.useState('top'); const items = [ Sticky top Sticky bottom ,
{[...new Array(50)].map((_, index) => (
Long content
))}
, ]; return ( setSticky(newValue)} sx={{ p: 1, maxHeight: 200, overflowY: 'auto' }} > {sticky === 'top' ? items : items.reverse()} ); }