Skip to main content

Configure the following properties on the ScrollBox component.

Anchor to blockSize
blockSize
Default: 'auto'

The block size of the scrollable container. Auto automatically sizes based on the container's content and available space.

string

A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features.

Anchor to inlineSize
inlineSize
Default: 'auto'

The inline size of the scrollable container. Auto automatically sizes based on the container's content and available space.

Anchor to maxBlockSize
maxBlockSize
Default: 'none'

The maximum block size constraint for the scrollable container.

Anchor to maxInlineSize
maxInlineSize
Default: 'none'

The maximum inline size constraint for the scrollable container.

Anchor to minBlockSize
minBlockSize
Default: '0'

The minimum block size constraint for the scrollable container.

Anchor to minInlineSize
minInlineSize
Default: '0'

The minimum inline size constraint for the scrollable container.

Anchor to padding
padding
<>
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:

  • large means block-start, inline-end, block-end and inline-start paddings are large.
  • large none means block-start and block-end paddings are large, inline-start and inline-end paddings are none.
  • large none large means block-start padding is large, inline-end padding is none, block-end padding is large and inline-start padding is none.
  • large none large small means block-start padding is large, inline-end padding is none, block-end padding is large and inline-start padding is small.

An auto value inherits the default padding from the closest container that has removed its usual padding.

Anchor to paddingBlock
paddingBlock
'' | <>
Default: '' - meaning no override

The block-axis padding for the scrollable container. Overrides the block value of the padding property.

Anchor to paddingBlockEnd
paddingBlockEnd
'' |
Default: '' - meaning no override

The block-end padding for the scrollable container. Overrides the block-end value of the paddingBlock property.

Anchor to paddingBlockStart
paddingBlockStart
'' |
Default: '' - meaning no override

The block-start padding for the scrollable container. Overrides the block-start value of the paddingBlock property.

Anchor to paddingInline
paddingInline
'' | <>
Default: '' - meaning no override

The inline-axis padding for the scrollable container. Supports two-value syntax where large none sets inline-start to large and inline-end to none. Overrides the inline value of the padding property.

Anchor to paddingInlineEnd
paddingInlineEnd
'' |
Default: '' - meaning no override

The inline-end padding for the scrollable container. Overrides the inline-end value of the paddingInline property.

Anchor to paddingInlineStart
paddingInlineStart
'' |
Default: '' - meaning no override

The inline-start padding for the scrollable container. Overrides the inline-start value of the paddingInline property.


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 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

<s-scroll-box>
<s-choice-list>
<s-choice value="true-twin">True Twin board</s-choice>
<s-choice value="directional">Directional board</s-choice>
<s-choice value="volume">Volume shifted board</s-choice>
<s-choice value="asymmetrical">Asymmetrical board</s-choice>
</s-choice-list>
</s-scroll-box>

  • 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.

Was this page helpful?