Scroll box
The scroll box component creates a scrollable area for content that exceeds container bounds. Use it to display large amounts of content within constrained spaces while maintaining usability.
The component creates a defined scrollable area with customizable dimensions and scroll behavior.
Anchor to PropertiesProperties
Configure the following properties on the ScrollBox component.
- Anchor to blockSizeblock
Sizeblock Size SizeUnitsOrAutoSizeUnitsOrAutoDefault: 'auto'Default: 'auto' The block size of the scrollable container. Auto automatically sizes based on the container's content and available space.
- Anchor to idididstringstring
A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features.
- Anchor to inlineSizeinline
Sizeinline Size SizeUnitsOrAutoSizeUnitsOrAutoDefault: 'auto'Default: 'auto' The inline size of the scrollable container. Auto automatically sizes based on the container's content and available space.
- Anchor to maxBlockSizemax
Block Sizemax Block Size SizeUnitsOrNoneSizeUnitsOrNoneDefault: 'none'Default: 'none' The maximum block size constraint for the scrollable container.
- Anchor to maxInlineSizemax
Inline Sizemax Inline Size SizeUnitsOrNoneSizeUnitsOrNoneDefault: 'none'Default: 'none' The maximum inline size constraint for the scrollable container.
- Anchor to minBlockSizemin
Block Sizemin Block Size SizeUnitsSizeUnitsDefault: '0'Default: '0' The minimum block size constraint for the scrollable container.
- Anchor to minInlineSizemin
Inline Sizemin Inline Size SizeUnitsSizeUnitsDefault: '0'Default: '0' The minimum inline size constraint for the scrollable container.
- Anchor to paddingpaddingpaddingMaybeAllValuesShorthandProperty<PaddingKeyword>MaybeAllValuesShorthandProperty<PaddingKeyword>Default: 'none'Default: 'none'
The padding applied to all edges of the scrollable container. Supports 1-to-4-value syntax using flow-relative values in the order:
- 4 values:
block-start inline-end block-end inline-start - 3 values:
block-start inline block-end - 2 values:
block inline
For example:
largemeans block-start, inline-end, block-end and inline-start paddings arelarge.large nonemeans block-start and block-end paddings arelarge, inline-start and inline-end paddings arenone.large none largemeans block-start padding islarge, inline-end padding isnone, block-end padding islargeand inline-start padding isnone.large none large smallmeans block-start padding islarge, inline-end padding isnone, block-end padding islargeand inline-start padding issmall.
An
autovalue inherits the default padding from the closest container that has removed its usual padding.- 4 values:
- Anchor to paddingBlockpadding
Blockpadding Block '' | MaybeTwoValuesShorthandProperty<PaddingKeyword>'' | MaybeTwoValuesShorthandProperty<PaddingKeyword>Default: '' - meaning no overrideDefault: '' - meaning no override The block-axis padding for the scrollable container. Overrides the block value of the
paddingproperty.- Anchor to paddingBlockEndpadding
Block Endpadding Block End '' | PaddingKeyword'' | PaddingKeywordDefault: '' - meaning no overrideDefault: '' - meaning no override The block-end padding for the scrollable container. Overrides the block-end value of the
property.- Anchor to paddingBlockStartpadding
Block Startpadding Block Start '' | PaddingKeyword'' | PaddingKeywordDefault: '' - meaning no overrideDefault: '' - meaning no override The block-start padding for the scrollable container. Overrides the block-start value of the
property.- Anchor to paddingInlinepadding
Inlinepadding Inline '' | MaybeTwoValuesShorthandProperty<PaddingKeyword>'' | MaybeTwoValuesShorthandProperty<PaddingKeyword>Default: '' - meaning no overrideDefault: '' - meaning no override The inline-axis padding for the scrollable container. Supports two-value syntax where
large nonesets inline-start tolargeand inline-end tonone. Overrides the inline value of thepaddingproperty.- Anchor to paddingInlineEndpadding
Inline Endpadding Inline End '' | PaddingKeyword'' | PaddingKeywordDefault: '' - meaning no overrideDefault: '' - meaning no override The inline-end padding for the scrollable container. Overrides the inline-end value of the
property.- Anchor to paddingInlineStartpadding
Inline Startpadding Inline Start '' | PaddingKeyword'' | PaddingKeywordDefault: '' - meaning no overrideDefault: '' - meaning no override The inline-start padding for the scrollable container. Overrides the inline-start value of the
property.
SizeUnitsOrAuto
Defines size values that can be specified as exact measurements or automatic sizing. Supports pixel values, percentages, zero, or automatic sizing based on content.
SizeUnits | 'auto'SizeUnits
Defines exact size measurements without automatic or unconstrained options. Limited to specific pixel values, percentages, or zero.
`${number}px` | `${number}%` | `0`SizeUnitsOrNone
Defines size values that can be specified as exact measurements or no constraint. Supports pixel values, percentages, zero, or no maximum limit.
SizeUnits | 'none'MaybeAllValuesShorthandProperty
A utility type for properties that support [1-to-4-value shorthand syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascade/Shorthand_properties#edges_of_a_box).
T | `${T} ${T}` | `${T} ${T} ${T}` | `${T} ${T} ${T} ${T}`PaddingKeyword
Defines the available padding size options using a semantic scale. Provides consistent spacing values that align with the POS design system.
SizeKeyword | 'none'SizeKeyword
Defines the available size options for icons using a semantic scale. Provides granular control over icon dimensions from compact inline sizes to prominent display sizes.
'small-500' | 'small-400' | 'small-300' | 'small-200' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'large-200' | 'large-300' | 'large-400' | 'large-500'MaybeTwoValuesShorthandProperty
Defines a shorthand property that accepts either a single value or two space-separated values for directional properties like padding and spacing.
T | `${T} ${T}`Anchor to ExamplesExamples
Anchor to Create a scrollable content areaCreate a scrollable content area
Create scrollable content areas using a scroll box component for content that exceeds container bounds. This example shows a basic scrollable area with customizable dimensions.Create a scrollable content area

Create a scrollable content area
Anchor to Best practicesBest practices
- Set clear dimensions: Use percentage values for responsive layouts or pixels for exact dimensions.
- Use for appropriate content: Reserve scroll box for long lists or dynamic content that genuinely needs scrolling, not short content that fits within available space.