Scroll area

Playground

Properties

Direction

Usage

높이와 너비는 앱에서 지정합니다. vertical, horizontal, concurrently 중 콘텐츠에 맞는 방향을 사용합니다.

'use client';
import { ScrollArea } from '@mbsw/ui';

export default function Example() {
  return (
    <ScrollArea
      style={{ height: 240, width: 320, maxWidth: '100%' }}
      viewportProps={{ role: 'region', 'aria-label': "콘텐츠 목록" }}
    >
      {Array.from({ length: 20 }, (_, index) => (
        <p key={index}>content {index + 1}</p>
      ))}
    </ScrollArea>
  );
}

Playground의 Code 탭에서 현재 설정과 동작이 포함된 예제 전체를 복사할 수 있습니다. 공통 CSS 설치는 설치하기를 확인하세요.

Composition