Concepts
OverviewCompositionTestingLayout
Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrapComponents
AccordionAdmonitionAvatarButtonCheckboxComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsProgressPrompt ModalRadioRatingSelectSwitchTableTabsTagTextTextareaToggleTooltipUtilities
Feature FlagsForLocal StoragePortalShowsplitPropsThemeScrollable
A layout pattern to create scrollable containers.
1import { Scrollable } from "styled-system/jsx";2
3const Demo = () => {4 return (5 <Scrollable h="200px">6 <Box bgColor="page.surface.100" color="white" padding="4" width="full" >7 This is the Box8 </Box>9 </Scrollable>10 )11}
Usage
The Scrollable
component provides an easy way to create scrollable containers without having to worry about overflow styles.
1import { Scrollable } from "styled-system/jsx";
1<Scrollable />
Examples
Direction
Use vertical
or horizontal
to control the overflow scrolling direction.
1import { Scrollable } from "styled-system/jsx";2
3const Demo = () => {4 return (5 <Scrollable direction="horizontal" w="200px">6 This is horizontal scrolling content.7 </Scrollable>8 )9}
Scrollbar visibility
You can control the visibility of the scrollbar using the hideScrollbar
prop.
1import { Scrollable } from "styled-system/jsx";2const Demo = () => {3 return (4 <Scrollable hideScrollbar>5 This is content with a hidden scrollbar.6 </Scrollable>7 )8}
Props
The Box
component supports all CSS properties as props, making it easy to
style elements.
On this page