Theme

Examples › Scrollable vs. auto-height

Try the interactive example below to see the feature it in action:
DustinSawaynDustin.Sawayn@yahoo.com
EarnestHellerEarnest6@yahoo.com
SheilaKesslerSheila.Kessler@hotmail.com
BrayanMacejkovicBrayan3@hotmail.com
AssuntaAnkundingAssunta79@gmail.com
JavonteSchummJavonte14@gmail.com
JenniferVonJennifer_Von87@hotmail.com
MozellBeckerMozell.Becker@yahoo.com
HoraceBayerHorace.Bayer24@yahoo.com
ChaunceyHoegerChauncey.Hoeger7@gmail.com
RemingtonHansenRemington.Hansen9@yahoo.com
SammyMayerSammy.Mayer19@yahoo.com
MarilouMorarMarilou.Morar@gmail.com
ArmandoZiemeArmando_Zieme@gmail.com
DakotaLittleDakota.Little@gmail.com
No records
The DataTable component embeds a Mantine ScrollArea and has a default height of 100%.
Thus, setting the component height or placing it inside a height-restricted container will turn on its “vertically-scrollable” behavior.
return (
<DataTable
height={300}
// other props...
/>

Customize the underlying ScrollArea

You can customize the underlying scroll area by passing scrollAreaProps to the DataTable component. The scrollAreaProps accepts a subset of Mantine ScrollArea props: type, scrollbarSize and scrollHideDelay. For instance, here’s how you could make the scrollbars invisible:
<DataTable
height={300}
// other props...
scrollAreaProps={{ type: 'never' }}
/>
DustinSawaynDustin.Sawayn@yahoo.com
EarnestHellerEarnest6@yahoo.com
SheilaKesslerSheila.Kessler@hotmail.com
BrayanMacejkovicBrayan3@hotmail.com
AssuntaAnkundingAssunta79@gmail.com
JavonteSchummJavonte14@gmail.com
JenniferVonJennifer_Von87@hotmail.com
MozellBeckerMozell.Becker@yahoo.com
HoraceBayerHorace.Bayer24@yahoo.com
ChaunceyHoegerChauncey.Hoeger7@gmail.com
RemingtonHansenRemington.Hansen9@yahoo.com
SammyMayerSammy.Mayer19@yahoo.com
MarilouMorarMarilou.Morar@gmail.com
ArmandoZiemeArmando_Zieme@gmail.com
DakotaLittleDakota.Little@gmail.com
No records

Mantine DataTable is trusted by

MIT LicenseSponsor the author
Built by Ionut-Cristian Florescu and these awesome people.
Please sponsor the project if you find it useful.
GitHub StarsNPM Downloads