미디어
창
스크린샷, 데모 또는 터미널을 감싸는 애플리케이션 창 형태의 프레임입니다.
이 페이지의 내용
창은 스크린샷, 짧은 데모, 몇 줄의 터미널 출력처럼 보여 주려는 콘텐츠를 애플리케이션 창처럼 감싸는 프레임입니다. 살짝 떠 있는 판의 상단에 가로 막대가 놓입니다. 막대의 표시 세 개는 윤곽선과 같은 무채색으로 그려 창의 형태를 알아볼 수 있게 하고, 콘텐츠 자체의 색이 돋보이게 합니다.
창
<figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">Atlas · Deployments</span> </div> <img class="window-body object-cover w-full" style="aspect-ratio: 16 / 10" src="/demo/moonstone.svg" alt="The deployments view of Atlas"></figure><figure className="window max-w(520) mx-auto"> <div className="window-bar"> <span className="window-controls" aria-hidden="true"></span> <span className="window-title">Atlas · Deployments</span> </div> <img className="window-body object-cover w-full" style={{ aspectRatio: '16 / 10' }} src="/demo/moonstone.svg" alt="The deployments view of Atlas" /></figure><figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">Atlas · Deployments</span> </div> <img class="window-body object-cover w-full" style="aspect-ratio: 16 / 10" src="/demo/moonstone.svg" alt="The deployments view of Atlas"></figure><template> <figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">Atlas · Deployments</span> </div> <img class="window-body object-cover w-full" style="aspect-ratio: 16 / 10" src="/demo/moonstone.svg" alt="The deployments view of Atlas"> </figure></template>#상단 막대
window-bar에는 세 영역이 있습니다. 시작 영역의 window-controls는 빈 요소 하나이며, 원 세 개로 표시됩니다. 중앙에는 window-title이나 브라우저의 주소창처럼 작고 오목한 영역인 window-address를 배치합니다. window-end에는 막대 끝에 놓을 콘텐츠를 넣습니다. 각 부분은 생략할 수 있으며, 양옆에 무엇이 놓이든 중앙 영역은 가운데에 유지됩니다.
주소창
<figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-address"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <rect x="3" y="7" width="10" height="7" rx="1" /><path d="M5.5 7V4.5A2.5 2.5 0 0 1 10.5 4.5V7" /><path d="M8 9.5L8 11" /> </svg>atlas.dev/deployments </span> <span class="window-end"><span class="badge badge-sm badge-success badge-dot">Live</span></span> </div> <div class="window-body flex flex-col gap-sm p-lg"> <div class="skeleton skeleton-text w(180)"></div> <div class="skeleton skeleton-text"></div> <div class="skeleton skeleton-text w(320)"></div> <div class="skeleton h(96) mt-xs"></div> </div></figure>import LockIcon from '@master/icons-react/native/16/soft/lock'<figure className="window max-w(520) mx-auto"> <div className="window-bar"> <span className="window-controls" aria-hidden="true"></span> <span className="window-address"><LockIcon className="icon" />atlas.dev/deployments</span> <span className="window-end"> <span className="badge badge-sm badge-success badge-dot">Live</span> </span> </div> <div className="window-body flex flex-col gap-sm p-lg"> <div className="skeleton skeleton-text w(180)"></div> <div className="skeleton skeleton-text"></div> <div className="skeleton skeleton-text w(320)"></div> <div className="skeleton h(96) mt-xs"></div> </div></figure><script> import LockIcon from '@master/icons-svelte/native/16/soft/lock'</script><figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-address"><LockIcon class="icon" />atlas.dev/deployments</span> <span class="window-end"><span class="badge badge-sm badge-success badge-dot">Live</span></span> </div> <div class="window-body flex flex-col gap-sm p-lg"> <div class="skeleton skeleton-text w(180)"></div> <div class="skeleton skeleton-text"></div> <div class="skeleton skeleton-text w(320)"></div> <div class="skeleton h(96) mt-xs"></div> </div></figure><script setup>import LockIcon from '@master/icons-vue/native/16/soft/lock'</script><template> <figure class="window max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-address"><LockIcon class="icon" />atlas.dev/deployments</span> <span class="window-end"> <span class="badge badge-sm badge-success badge-dot">Live</span> </span> </div> <div class="window-body flex flex-col gap-sm p-lg"> <div class="skeleton skeleton-text w(180)"></div> <div class="skeleton skeleton-text"></div> <div class="skeleton skeleton-text w(320)"></div> <div class="skeleton h(96) mt-xs"></div> </div> </figure></template>#본문
window-body에는 패딩이 없어 이미지나 동영상이 프레임에 맞닿고 창의 모서리 모양에 맞게 잘립니다. 텍스트에는 패딩 유틸리티로 여백을 줍니다. 콘텐츠 자체에 해당하는 <img>, <video>, <pre> 또는 <div> 요소에 클래스를 적용합니다.
window-flat은 윤곽선 하나만 유지하고 그림자를 없앱니다. 트레이 위에 놓이거나 콘텐츠가 밀집된 페이지에 들어가는 창에 적합합니다.
터미널
<figure class="window window-flat max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">zsh</span> </div> <pre class="window-body p-md font-mono text-xs leading-lg fg-text-strong overflow-x-auto"><span class="fg-text-muted">$</span> npm install @master/css @master/ui<span class="fg-text-muted">added 2 packages in 1.4s</span><span class="fg-text-muted">$</span> npm run dev</pre></figure><figure class="window window-flat max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">zsh</span> </div> <pre class="window-body p-md font-mono text-xs leading-lg fg-text-strong overflow-x-auto"><span class="fg-text-muted">$</span> npm install @master/css @master/ui<span class="fg-text-muted">added 2 packages in 1.4s</span><span class="fg-text-muted">$</span> npm run dev</pre></figure><template> <figure class="window window-flat max-w(520) mx-auto"> <div class="window-bar"> <span class="window-controls" aria-hidden="true"></span> <span class="window-title">zsh</span> </div> <pre class="window-body p-md font-mono text-xs leading-lg fg-text-strong overflow-x-auto"><span class="fg-text-muted">$</span> npm install @master/css @master/ui<span class="fg-text-muted">added 2 packages in 1.4s</span><span class="fg-text-muted">$</span> npm run dev</pre> </figure></template>#접근성
- 프레임은 장식용입니다. 원형 표시는 버튼이 아니며 아무 동작도 하지 않으므로
aria-hidden="true"로window-controls를 숨깁니다. - 주변 본문의 내용을 시각적으로 보여 주는 창에는
<figure>요소가 적합합니다. 그림에 설명이 필요하면 그 뒤에<figcaption>을 추가합니다. - 스크린샷의 내용은
alt에 설명하세요. 막대의 제목은 그림의 일부이며 스크린샷의 대체 설명을 대신할 수 없습니다. - 실제로 동작하는 대화 상자를 만드는 데는 이 컴포넌트를 사용하지 않습니다. 페이지 위에 열리는 창에는 대화 상자를 사용합니다.
#클래스
| 클래스 | 설명 |
|---|---|
window | 프레임은 살짝 떠 보이는 표면입니다. 모서리 반경은 12px이며, 프레임 밖으로 넘치는 콘텐츠는 잘라냅니다. |
window-flat | 트레이 위나 콘텐츠가 촘촘한 페이지에 놓인 창에 윤곽선 하나만 적용하고 그림자는 생략합니다.적용할 클래스는 window입니다 |
window-bar | 상단을 가로지르는 바입니다. 시작 쪽에는 표식을, 가운데에는 제목이나 주소를 배치하고, 끝에는 컨트롤을 넣을 공간을 둡니다. |
window-controls | 빈 요소 하나로 상단 바의 시작 쪽에 표식 3개를 그립니다. 해당 요소는 aria-hidden="true"로 보조 기술에서 숨깁니다. |
window-title | 바 중앙에 놓인 한 줄 제목 |
window-address | 제목 대신 바 중앙의 작은 오목한 영역에 표시하는 주소 |
window-end | 상단 바 끝에 표시되는 요소 |
window-body | 창에는 이미지, 동영상, pre 또는 div를 표시할 수 있습니다. 안쪽 여백은 없습니다. |
#사용자 지정 속성
| 속성 | 기본값 | 설명 |
|---|---|---|
--window-radius | var(--radius-control-lg) | 프레임의 모서리 반경 |
--window-bar-height | 2.5rem | 상단 바의 높이 |
#관련 항목
- 기기스크린샷, 동영상 또는 실행 중인 데모를 감싸는 휴대전화 본체입니다.
- 그림가장자리를 다듬은 이미지나 동영상을 캡션과 함께 표시합니다.
- 카드카드에 주어진 공간에 따라 내부 배치가 달라지는, 살짝 떠 있는 시트입니다.
- 코드텍스트를 입력된 그대로 고정폭 글꼴로 표시합니다. 인라인이나 블록으로 사용할 수 있습니다.