Inspector
Playground
TSX
'use client';
import { useState, type ReactNode } from 'react';
import {
Inspector,
InspectorHeader,
InspectorContent,
InspectorSeparator,
ScrollArea,
Select,
SelectTrigger,
SelectValue,
SelectContent,
SelectItem,
SelectGroup,
Avatar,
Badge,
Icon,
type InspectorVariant,
} from '@mbsw/ui';
import { CalendarDays, FolderKanban } from 'lucide-react';
function Property({ label, children }: { label: string; children: ReactNode }) {
return (
<div
style={{
display: 'grid',
gridTemplateColumns: '68px minmax(0, 1fr)',
alignItems: 'center',
gap: 12,
minHeight: 28,
}}
>
<dt style={{ color: 'var(--riido-foreground-secondary)' }}>{label}</dt>
<dd style={{ margin: 0, display: 'flex', alignItems: 'center', gap: 6 }}>
{children}
</dd>
</div>
);
}
export default function Demo() {
const settings = {
"title": "디자인시스템 가이드",
"description": "신규 사용자 온보딩",
"variant": "default"
};
const [status, setStatus] = useState('in-progress');
return (
<ScrollArea
variant="horizontal"
style={{ width: 320, maxWidth: '100%' }}
viewportProps={{ role: 'region', 'aria-label': "작업 정보 미리보기" }}
>
<Inspector
variant={settings.variant as InspectorVariant}
style={{
width: '100%',
height: settings.variant === 'scroll' ? 280 : 'auto',
}}
aria-label={"작업 정보"}
>
<InspectorHeader>
<h2
style={{
margin: 0,
fontSize: 14,
lineHeight: '24px',
fontWeight: 600,
}}
>
{"작업 정보"}
</h2>
</InspectorHeader>
<InspectorSeparator />
<InspectorContent>
<div style={{ display: 'grid', gap: 4, padding: '4px 0 8px' }}>
<span
style={{
fontSize: 12,
color: 'var(--riido-foreground-tertiary)',
}}
>
WORK-128
</span>
<p
style={{
margin: 0,
fontSize: 14,
lineHeight: '20px',
fontWeight: 500,
}}
>
{settings.title}
</p>
</div>
</InspectorContent>
<InspectorSeparator />
<InspectorContent>
<dl
style={{
display: 'grid',
gap: 4,
margin: 0,
width: '100%',
fontSize: 12,
lineHeight: '18px',
}}
>
<Property label={"상태"}>
<Select value={status} onValueChange={setStatus}>
<SelectTrigger
size="sm"
aria-label={"작업 상태"}
style={{ width: '100%' }}
>
<SelectValue />
</SelectTrigger>
<SelectContent position="popper" sideOffset={4}>
<SelectGroup>
<SelectItem value="todo">{"할 일"}</SelectItem>
<SelectItem value="in-progress">
{"진행 중"}
</SelectItem>
<SelectItem value="done">{"완료"}</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
</Property>
<Property label={"담당자"}>
<Avatar initials="M" label={"김민서"} size="sm" />
<span>{"김민서"}</span>
</Property>
<Property label={"프로젝트"}>
<Icon icon={FolderKanban} size="xs" decorative />
<span>{settings.description}</span>
</Property>
<Property label={"시작일"}>
<Icon icon={CalendarDays} size="xs" decorative />
<time dateTime="2026-10-01">2026. 10. 01.</time>
</Property>
<Property label={"마감일"}>
<Icon icon={CalendarDays} size="xs" decorative />
<time dateTime="2026-10-08">2026. 10. 08.</time>
</Property>
<Property label={"태그"}>
<Badge
size="sm"
shape="square"
style={{
backgroundColor: 'var(--riido-primitive-colors-iris-400)',
color: 'var(--riido-foreground-on-brand)',
}}
>
{"디자인"}
</Badge>
</Property>
</dl>
</InspectorContent>
<InspectorSeparator />
<InspectorContent>
<span
style={{
color: 'var(--riido-foreground-tertiary)',
fontSize: 12,
lineHeight: '20px',
}}
>
{"생성일"}{' '}
<time dateTime="2026-09-28">2026. 09. 28.</time>
</span>
</InspectorContent>
</Inspector>
</ScrollArea>
);
}
Properties
Variant
Content
Title
Project
Usage
Header와 Content를 조합하고 Separator로 구역을 나눕니다. scroll 변형에서는 앱에서 높이를 지정합니다. MBSW Inspector의 최소 너비는 280px이며, 더 좁은 컨테이너에서는 예제처럼 키보드로 이동 가능한 가로 스크롤 영역을 제공합니다.
TSX
'use client';
import { Inspector, InspectorHeader, InspectorContent } from '@mbsw/ui';
export default function Example() {
return (
<Inspector aria-label={"작업 정보"}>
<InspectorHeader>{"작업 정보"}</InspectorHeader>
<InspectorContent>{"디자인시스템 가이드: 신규 사용자 온보딩"}</InspectorContent>
</Inspector>
);
}
Playground의 Code 탭에서 현재 설정과 동작이 포함된 예제 전체를 복사할 수 있습니다. 공통 CSS 설치는 설치하기를 확인하세요.