Harbor
harbor.dev · 2 hours ago
Ready대화 상자와 메뉴, 툴팁, 셀렉트의 열기와 위치 지정, 애니메이션까지 네이티브 요소와 최신 CSS로 구현합니다. 처음부터 JavaScript를 추가할 필요가 없습니다.
플랫폼
브라우저에 필요한 요소나 기능이 있으면 컴포넌트에서 그대로 사용합니다. 아래 예제를 하나씩 사용해 보세요. 모든 예제는 스크립트를 불러오지 않습니다.
브라우저 지원한 줄로 배치된 슬라이드가 정해진 위치에 맞춰 멈춥니다. 브라우저는 이전·다음 버튼과 슬라이드마다 탐색용 점을 하나씩 추가합니다.
::scroll-button() ::scroll-marker scroll-snap
a1f9e2cReady7c04b1dReadye55d0a8Building게시 버튼을 누르면 모달이 부드럽게 열리고, 열린 동안 포커스는 모달 안에 머뭅니다. Escape 키를 누르거나 배경을 클릭하면 모달이 부드럽게 닫히고 포커스가 게시 버튼으로 돌아갑니다.
<dialog> commandfor closedby @starting-style
brand-guidelines.pdf
메뉴는 버튼 옆에서 열리고 뷰포트 가장자리에서는 반대쪽으로 펼쳐집니다. Escape 키를 누르거나 메뉴 바깥을 클릭하면 닫힙니다.
popover position-area
포인터를 올리거나 키보드로 포커스를 옮기면 도구 이름과 단축키가 나타납니다. 툴팁은 클릭을 가로막지 않습니다.
popover="hint" interestfor
1.28M this week · up 12.4%
앵커에 그린 선택 표시가 현재 옵션으로 부드럽게 이동합니다. 막대는 나타날 때 기준선에서 위로 올라옵니다.
anchor-scope anchor() @starting-style
목록은 컨트롤에 고정된 플로팅 패널에서 열립니다. 현재 옵션 옆에는 체크 표시가 나타납니다.
appearance: base-select ::picker(select)
Design review
The focus ring is cut by the mask on the code panel. Should it move to the group?
Yes. The group already has the corner, so the ring follows it.
작성란은 한 줄에서 시작해 입력에 따라 최대 열 줄까지 커지고, 그 이후에는 내부가 스크롤됩니다. 위의 대화 내역 위치는 그대로 유지됩니다.
field-sizing: content
이름이 같은 항목은 하나를 열면 나머지가 닫힙니다. 각 패널은 interpolate-size를 사용해 콘텐츠 높이까지 부드럽게 펼쳐집니다.
::details-content interpolate-size details[name]
스크롤 기반 애니메이션이 손잡이 위치까지 트랙을 채웁니다.
view-timeline timeline-scope
사용자 지정
색상, 모서리, 그림자는 테마 토큰으로 결정됩니다. 라이브러리 스타일을 덮어쓸 필요 없이 토큰을 조정해 원하는 스타일을 적용할 수 있습니다.
내게 맞는 커스터마이징 방법일세 호수 둘레길
6.2 km · 2시간 10분
보트 보관소
출발 · 0.0 km
낙엽송 능선
2.6 km
정상
4.1 km
일세 호수 둘레길
6.2 km · 2시간 10분
보트 보관소
출발 · 0.0 km
낙엽송 능선
2.6 km
정상
4.1 km
일세 호수 둘레길
6.2 km · 2시간 10분
보트 보관소
출발 · 0.0 km
낙엽송 능선
2.6 km
정상
4.1 km
일세 호수 둘레길
6.2 km · 2시간 10분
보트 보관소
출발 · 0.0 km
낙엽송 능선
2.6 km
정상
4.1 km
themes/editorial.css토큰 51개
/* themes/editorial.css, imported after '@master/ui' */@theme { /* Type */ --font-sans: 'Iowan Old Style', Charter, Georgia, serif; --font-weight-control: 400; /* Shape: tight corners, and nothing travels */ --radius-chip: .125rem; --radius-control-sm: .125rem; --radius-control: .1875rem; --radius-control-lg: .25rem; --radius-surface: .25rem; --lift: 0px; /* Surfaces: cream paper, and newsprint at night */ --color-surface-base: light-dark(oklch(96.4% .014 84), oklch(19.5% .008 70)); --color-surface-raised: light-dark(oklch(98.6% .009 86), oklch(22.5% .009 70)); --color-surface-raised-low: var(--color-surface-raised); --color-surface-inset: light-dark(oklch(94.4% .016 84), oklch(17% .008 70)); --color-surface-inset-hover: light-dark(oklch(92.8% .018 84), oklch(15.8% .008 70)); --color-surface-chip: light-dark(oklch(93.4% .017 84), oklch(100% 0 none / .07)); --color-surface-inverse: light-dark(oklch(44% .15 27), oklch(68% .14 30)); /* Lines carry every edge */ --color-line-hair: light-dark(oklch(25% .02 60 / .14), oklch(95% .02 84 / .13)); --color-line-contour: light-dark(oklch(25% .02 60 / .3), oklch(95% .02 84 / .26)); --color-line-divider: light-dark(oklch(25% .02 60 / .22), oklch(95% .02 84 / .2)); --color-line-strong: light-dark(oklch(25% .02 60 / .5), oklch(95% .02 84 / .44)); --color-line-mark: light-dark(oklch(25% .02 60 / .75), oklch(95% .02 84 / .66)); /* Ink: warm black, and an oxblood accent */ --color-text-strong: light-dark(oklch(21% .014 55), oklch(94% .014 84)); --color-text-body: light-dark(oklch(33% .016 55), oklch(84% .014 84)); --color-text-muted: light-dark(oklch(46% .018 60), oklch(71% .014 80)); --color-text-inverse: light-dark(oklch(97.5% .01 84), oklch(18% .01 40)); --color-focus: var(--color-text-strong); --color-ink-high: var(--color-surface-inverse); --color-ink-low: var(--color-surface-inverse); --color-ink-high-hover: light-dark(oklch(49% .16 27), oklch(73% .13 30)); --color-ink-low-hover: var(--color-ink-high-hover); --color-ink-pressed: light-dark(oklch(39% .14 27), oklch(62% .14 30)); --color-ink-highlight: transparent; --color-ink-edge: transparent; /* Depth: a rule, not a shadow */ --color-highlight: transparent; --color-lip: transparent; --color-shade-1: transparent; --color-shade-2: transparent; --color-shade-3: transparent; --color-shade-4: transparent; --color-shade-5: transparent; --shadow-pressed: inset 0 0 0 1px var(--color-line-contour); --shadow-flat: 0 0 0 1px var(--color-line-contour); --shadow-raised: 0 0 0 1px var(--color-line-strong); --shadow-raised-hover: 0 0 0 1px var(--color-line-mark); --shadow-lifted: 0 0 0 1px var(--color-line-contour); --shadow-ink: 0 0 0 0 transparent; --shadow-ink-hover: 0 0 0 0 transparent; --shadow-ink-pressed: 0 0 0 0 transparent; --shadow-ink-well: 0 0 0 0 transparent; --shadow-thumb-on-ink: 0 0 0 0 transparent;} /* Circles in place of squircles */:root { --corner-shape: round; --corner-scale: 1;}themes/technical.css토큰 51개
/* themes/technical.css, imported after '@master/ui' */@theme { /* Type: load the font before selecting it */ --font-sans: 'IBM Plex Mono', ui-monospace, monospace; --font-weight-control: 500; /* Shape: square, and nothing travels */ --radius-chip: 0; --radius-control-sm: 0; --radius-control: 0; --radius-control-lg: 0; --radius-surface: 0; --lift: 0px; /* Surfaces: drafting film, and a navy console */ --color-surface-base: light-dark(oklch(96.8% .005 240), oklch(17.5% .014 250)); --color-surface-raised: light-dark(oklch(99.5% .002 240), oklch(21% .016 250)); --color-surface-raised-low: var(--color-surface-raised); --color-surface-inset: light-dark(oklch(95% .006 240), oklch(15% .014 250)); --color-surface-inset-hover: light-dark(oklch(93.5% .007 240), oklch(13.8% .014 250)); --color-surface-chip: light-dark(oklch(94% .008 240), oklch(100% 0 none / .07)); --color-surface-inverse: light-dark(oklch(52% .2 258), oklch(76% .13 236)); /* Lines: crisp, and a step cooler */ --color-line-hair: light-dark(oklch(30% .03 250 / .12), oklch(85% .05 240 / .12)); --color-line-contour: light-dark(oklch(30% .03 250 / .26), oklch(85% .05 240 / .24)); --color-line-divider: light-dark(oklch(30% .03 250 / .18), oklch(85% .05 240 / .17)); --color-line-strong: light-dark(oklch(30% .03 250 / .42), oklch(85% .05 240 / .38)); --color-line-mark: light-dark(oklch(30% .03 250 / .62), oklch(85% .05 240 / .6)); /* Ink: cobalt for what is on */ --color-text-strong: light-dark(oklch(20% .02 255), oklch(95% .01 240)); --color-text-body: light-dark(oklch(35% .02 255), oklch(82% .015 240)); --color-text-muted: light-dark(oklch(49% .02 250), oklch(69% .02 240)); --color-text-inverse: light-dark(oklch(99% 0 none), oklch(16% .02 250)); --color-focus: var(--color-surface-inverse); --color-ink-high: var(--color-surface-inverse); --color-ink-low: var(--color-surface-inverse); --color-ink-high-hover: light-dark(oklch(57% .2 258), oklch(81% .11 236)); --color-ink-low-hover: var(--color-ink-high-hover); --color-ink-pressed: light-dark(oklch(46% .19 258), oklch(70% .13 236)); --color-ink-highlight: transparent; --color-ink-edge: transparent; --color-thumb-on-high: light-dark(oklch(100% 0 none), oklch(16% .02 250)); --color-thumb-on-low: var(--color-thumb-on-high); /* Depth: one 1px line */ --color-highlight: transparent; --color-lip: transparent; --color-shade-1: transparent; --color-shade-2: transparent; --color-shade-3: transparent; --color-shade-4: transparent; --color-shade-5: transparent; --shadow-pressed: inset 0 0 0 1px var(--color-line-contour); --shadow-flat: 0 0 0 1px var(--color-line-contour); --shadow-raised: 0 0 0 1px var(--color-line-strong); --shadow-raised-hover: 0 0 0 1px var(--color-line-mark); --shadow-lifted: 0 0 0 1px var(--color-line-strong); --shadow-ink: 0 0 0 0 transparent; --shadow-ink-hover: 0 0 0 0 transparent; --shadow-ink-pressed: 0 0 0 0 transparent; --shadow-ink-well: 0 0 0 0 transparent; --shadow-thumb-on-ink: 0 0 0 0 transparent;}themes/soft.css토큰 42개
/* themes/soft.css, imported after '@master/ui' */@theme { /* Type: the font you have, a step heavier */ --font-weight-control: 520; /* Shape: controls round off to pills */ --radius-chip: .75rem; --radius-control-sm: 1rem; --radius-control: 1.1875rem; --radius-control-lg: 1.375rem; --radius-surface: 1.75rem; --lift: 1px; /* Surfaces: lavender, and plum at night */ --color-surface-base: light-dark(oklch(96.6% .016 300), oklch(20.5% .03 295)); --color-surface-raised: light-dark(oklch(99.6% .004 300), oklch(27% .035 295)); --color-surface-raised-low: light-dark(oklch(98.2% .009 300), oklch(25% .034 295)); --color-surface-inset: light-dark(oklch(94.6% .02 300), oklch(18.5% .03 295)); --color-surface-inset-hover: light-dark(oklch(93.2% .024 300), oklch(17.2% .03 295)); --color-surface-chip: light-dark(oklch(94.4% .02 300), oklch(100% 0 none / .08)); --color-surface-inverse: light-dark(oklch(55% .19 292), oklch(80% .11 292)); /* Lines: faint, and tinted */ --color-line-hair: light-dark(oklch(35% .1 295 / .08), oklch(92% .05 295 / .09)); --color-line-contour: light-dark(oklch(35% .1 295 / .12), oklch(92% .05 295 / .14)); --color-line-divider: light-dark(oklch(35% .1 295 / .1), oklch(92% .05 295 / .12)); --color-line-strong: light-dark(oklch(35% .1 295 / .2), oklch(92% .05 295 / .22)); --color-line-mark: light-dark(oklch(35% .1 295 / .34), oklch(92% .05 295 / .36)); /* Ink: violet for what is on */ --color-text-strong: light-dark(oklch(25% .05 295), oklch(95% .02 300)); --color-text-body: light-dark(oklch(40% .05 295), oklch(84% .03 300)); --color-text-muted: light-dark(oklch(51% .05 295), oklch(73% .04 300)); --color-text-inverse: light-dark(oklch(99% .005 300), oklch(20% .04 295)); --color-focus: var(--color-surface-inverse); --color-ink-high: light-dark(oklch(62% .18 292), oklch(86% .09 292)); --color-ink-low: light-dark(oklch(53% .2 290), oklch(77% .12 290)); --color-ink-high-hover: light-dark(oklch(66% .17 292), oklch(89% .08 292)); --color-ink-low-hover: light-dark(oklch(57% .19 290), oklch(81% .11 290)); --color-ink-pressed: light-dark(oklch(48% .19 290), oklch(72% .13 290)); --color-ink-edge: light-dark(oklch(46% .18 290), oklch(0% 0 none / .4)); --color-thumb-on-high: light-dark(oklch(100% 0 none), oklch(22% .04 295)); --color-thumb-on-low: light-dark(oklch(97% .01 300), oklch(20% .04 295)); /* Depth: wide, tinted shade */ --color-shade-1: light-dark(oklch(40% .12 295 / .07), oklch(5% .02 295 / .45)); --color-shade-2: light-dark(oklch(40% .12 295 / .07), oklch(5% .02 295 / .36)); --color-shade-3: light-dark(oklch(40% .12 295 / .08), oklch(5% .02 295 / .32)); --color-shade-4: light-dark(oklch(40% .12 295 / .1), oklch(5% .02 295 / .32)); --color-shade-5: light-dark(oklch(40% .12 295 / .14), oklch(5% .02 295 / .4)); --shadow-raised: inset 0 1px 0 var(--color-highlight), 0 0 0 .5px var(--color-line-contour), 0 2px 6px -2px var(--color-shade-1), 0 8px 18px -8px var(--color-shade-3); --shadow-raised-hover: inset 0 1px 0 var(--color-highlight), 0 0 0 .5px var(--color-line-strong), 0 4px 10px -3px var(--color-shade-2), 0 14px 28px -10px var(--color-shade-4); --shadow-lifted: inset 0 1px 0 var(--color-highlight), 0 0 0 .5px var(--color-line-contour), 0 6px 16px -6px var(--color-shade-2), 0 28px 60px -24px var(--color-shade-5); --shadow-ink: inset 0 1px 0 oklch(100% 0 none / .3), 0 0 0 .5px var(--color-ink-edge), 0 6px 16px -6px light-dark(oklch(50% .2 290 / .55), oklch(0% 0 none / .5)); --shadow-ink-hover: inset 0 1px 0 oklch(100% 0 none / .34), 0 0 0 .5px var(--color-ink-edge), 0 10px 22px -8px light-dark(oklch(50% .2 290 / .6), oklch(0% 0 none / .55));}themes/bold.css토큰 52개
/* themes/bold.css, imported after '@master/ui' */@theme { /* Type: the font you have, at its boldest */ --font-weight-control: 700; /* Shape: plain circular corners, and a long press */ --radius-chip: .25rem; --radius-control-sm: .375rem; --radius-control: .5rem; --radius-control-lg: .625rem; --radius-surface: .75rem; --lift: 2px; /* Surfaces: butter and white, or black */ --color-surface-base: light-dark(oklch(95.5% .04 92), oklch(16% .005 280)); --color-surface-raised: light-dark(oklch(100% 0 none), oklch(22% .006 280)); --color-surface-raised-low: var(--color-surface-raised); --color-surface-inset: light-dark(oklch(93% .045 92), oklch(14% .005 280)); --color-surface-inset-hover: light-dark(oklch(90.5% .055 92), oklch(12% .005 280)); --color-surface-chip: light-dark(oklch(92% .05 92), oklch(100% 0 none / .1)); --color-surface-inverse: oklch(87% .175 95); /* Lines: solid ink, 2px wide */ --color-line-hair: light-dark(oklch(15% 0 none / .2), oklch(96% .02 95 / .2)); --color-line-contour: light-dark(oklch(15% 0 none), oklch(96% .02 95)); --color-line-divider: light-dark(oklch(15% 0 none / .35), oklch(96% .02 95 / .3)); --color-line-strong: var(--color-line-contour); --color-line-mark: var(--color-line-contour); /* Ink: yellow for what is on, in both schemes */ --color-text-strong: light-dark(oklch(15% 0 none), oklch(97% .02 95)); --color-text-body: light-dark(oklch(22% 0 none), oklch(90% .02 95)); --color-text-muted: light-dark(oklch(38% .01 90), oklch(77% .02 95)); --color-text-inverse: oklch(15% 0 none); --color-focus: light-dark(oklch(15% 0 none), oklch(87% .175 95)); --color-ink-high: var(--color-surface-inverse); --color-ink-low: var(--color-surface-inverse); --color-ink-high-hover: oklch(90% .16 95); --color-ink-low-hover: var(--color-ink-high-hover); --color-ink-pressed: oklch(81% .17 90); --color-ink-highlight: transparent; --color-ink-edge: var(--color-line-contour); --color-thumb-on-high: oklch(15% 0 none); --color-thumb-on-low: oklch(15% 0 none); /* Depth: a hard shadow, offset */ --color-highlight: transparent; --color-lip: transparent; --color-shade-1: transparent; --color-shade-2: transparent; --color-shade-3: transparent; --color-shade-4: transparent; --color-shade-5: transparent; --shadow-pressed: inset 0 0 0 2px var(--color-line-contour); --shadow-flat: 0 0 0 2px var(--color-line-contour); --shadow-raised: 0 0 0 2px var(--color-line-contour), 3px 3px 0 2px var(--color-line-contour); --shadow-raised-hover: 0 0 0 2px var(--color-line-contour), 5px 5px 0 2px var(--color-line-contour); --shadow-lifted: 0 0 0 2px var(--color-line-contour), 6px 6px 0 2px var(--color-line-contour); --shadow-ink: var(--shadow-raised); --shadow-ink-hover: var(--shadow-raised-hover); --shadow-ink-pressed: var(--shadow-pressed); --shadow-ink-well: inset 0 0 0 2px var(--color-line-contour); --shadow-thumb-on-ink: 0 0 0 0 transparent;} /* Circles in place of squircles */:root { --corner-shape: round; --corner-scale: 1;}HTML부터
네이티브 요소에 클래스를 붙이면 컴포넌트가 됩니다. 그래서 같은 마크업을 일반 HTML, React, Svelte, Vue에서 그대로 사용할 수 있습니다. 별도의 런타임 설치나 하이드레이션 없이, 브라우저가 스타일시트 하나와 요소의 속성만으로 모양과 상태를 표현합니다.
프레임워크 컴포넌트<section class="card">
<header class="card-header">
<h3 class="card-title">Preview deployments</h3>
<p class="card-description">A URL for every pull request.</p>
<input type="checkbox" role="switch" class="switch card-action"
checked aria-label="Preview deployments">
</header>
<div class="card-body">
<label class="field">
Branch pattern
<input class="input" value="feature/*">
</label>
</div>
<footer class="card-footer">
<button type="button" class="btn btn-sm">Reset</button>
<button type="button" class="btn btn-sm btn-primary">Save</button>
</footer>
</section>export function PreviewDeployments() {
return (
<section className="card">
<header className="card-header">
<h3 className="card-title">Preview deployments</h3>
<p className="card-description">A URL for every pull request.</p>
<input type="checkbox" role="switch" className="switch card-action"
defaultChecked aria-label="Preview deployments" />
</header>
<div className="card-body">
<label className="field">
Branch pattern
<input className="input" defaultValue="feature/*" />
</label>
</div>
<footer className="card-footer">
<button type="button" className="btn btn-sm">Reset</button>
<button type="button" className="btn btn-sm btn-primary">Save</button>
</footer>
</section>
)
}<section class="card">
<header class="card-header">
<h3 class="card-title">Preview deployments</h3>
<p class="card-description">A URL for every pull request.</p>
<input type="checkbox" role="switch" class="switch card-action"
checked aria-label="Preview deployments">
</header>
<div class="card-body">
<label class="field">
Branch pattern
<input class="input" value="feature/*">
</label>
</div>
<footer class="card-footer">
<button type="button" class="btn btn-sm">Reset</button>
<button type="button" class="btn btn-sm btn-primary">Save</button>
</footer>
</section><template>
<section class="card">
<header class="card-header">
<h3 class="card-title">Preview deployments</h3>
<p class="card-description">A URL for every pull request.</p>
<input type="checkbox" role="switch" class="switch card-action"
checked aria-label="Preview deployments">
</header>
<div class="card-body">
<label class="field">
Branch pattern
<input class="input" value="feature/*">
</label>
</div>
<footer class="card-footer">
<button type="button" class="btn btn-sm">Reset</button>
<button type="button" class="btn btn-sm btn-primary">Save</button>
</footer>
</section>
</template>스타일시트만으로 렌더링
A URL for every pull request.
<div class="toast-region" role="region"
aria-label="Notifications" aria-live="polite">
<dialog open class="toast toast-success" aria-labelledby="forge-toast">
<svg class="icon toast-icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<circle cx="8" cy="8" r="6"/>
<path d="M5 8L7.1041 9.8703A0.2 0.2 0 0 0 7.3832
9.8573L10.75 6.25"/>
</svg>
<div class="toast-body">
<p class="toast-title" id="forge-toast">Deployed to production</p>
<p class="toast-description">atlas.dev is live in 14 regions.</p>
</div>
<form method="dialog" class="toast-close">
<button class="btn btn-quiet btn-square btn-sm" aria-label="Dismiss">
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<path d="M4 4L12 12"/>
<path d="M4 12L12 4"/>
</svg>
</button>
</form>
</dialog>
</div>export function DeployedToast() {
return (
<div className="toast-region" role="region"
aria-label="Notifications" aria-live="polite">
<dialog open className="toast toast-success" aria-labelledby="forge-toast">
<svg className="icon toast-icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" strokeLinecap="round">
<circle cx="8" cy="8" r="6"/>
<path d="M5 8L7.1041 9.8703A0.2 0.2 0 0 0 7.3832
9.8573L10.75 6.25"/>
</svg>
<div className="toast-body">
<p className="toast-title" id="forge-toast">Deployed to production</p>
<p className="toast-description">atlas.dev is live in 14 regions.</p>
</div>
<form method="dialog" className="toast-close">
<button className="btn btn-quiet btn-square btn-sm" aria-label="Dismiss">
<svg className="icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" strokeLinecap="round">
<path d="M4 4L12 12"/>
<path d="M4 12L12 4"/>
</svg>
</button>
</form>
</dialog>
</div>
)
}<div class="toast-region" role="region"
aria-label="Notifications" aria-live="polite">
<dialog open class="toast toast-success" aria-labelledby="forge-toast">
<svg class="icon toast-icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<circle cx="8" cy="8" r="6"/>
<path d="M5 8L7.1041 9.8703A0.2 0.2 0 0 0 7.3832
9.8573L10.75 6.25"/>
</svg>
<div class="toast-body">
<p class="toast-title" id="forge-toast">Deployed to production</p>
<p class="toast-description">atlas.dev is live in 14 regions.</p>
</div>
<form method="dialog" class="toast-close">
<button class="btn btn-quiet btn-square btn-sm" aria-label="Dismiss">
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<path d="M4 4L12 12"/>
<path d="M4 12L12 4"/>
</svg>
</button>
</form>
</dialog>
</div><template>
<div class="toast-region" role="region"
aria-label="Notifications" aria-live="polite">
<dialog open class="toast toast-success" aria-labelledby="forge-toast">
<svg class="icon toast-icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<circle cx="8" cy="8" r="6"/>
<path d="M5 8L7.1041 9.8703A0.2 0.2 0 0 0 7.3832
9.8573L10.75 6.25"/>
</svg>
<div class="toast-body">
<p class="toast-title" id="forge-toast">Deployed to production</p>
<p class="toast-description">atlas.dev is live in 14 regions.</p>
</div>
<form method="dialog" class="toast-close">
<button class="btn btn-quiet btn-square btn-sm" aria-label="Dismiss">
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true"
fill="none" stroke="currentColor" stroke-linecap="round">
<path d="M4 4L12 12"/>
<path d="M4 12L12 4"/>
</svg>
</button>
</form>
</dialog>
</div>
</template>스타일시트만으로 렌더링
<div class="segmented" role="radiogroup" aria-label="View">
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="list" checked>
List
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="board">
Board
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="timeline">
Timeline
</label>
</div>export function ViewSwitch() {
return (
<div className="segmented" role="radiogroup" aria-label="View">
<label className="segmented-item">
<input type="radio" className="segmented-input"
name="forge-view" value="list" defaultChecked />
List
</label>
<label className="segmented-item">
<input type="radio" className="segmented-input"
name="forge-view" value="board" />
Board
</label>
<label className="segmented-item">
<input type="radio" className="segmented-input"
name="forge-view" value="timeline" />
Timeline
</label>
</div>
)
}<div class="segmented" role="radiogroup" aria-label="View">
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="list" checked>
List
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="board">
Board
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="timeline">
Timeline
</label>
</div><template>
<div class="segmented" role="radiogroup" aria-label="View">
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="list" checked>
List
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="board">
Board
</label>
<label class="segmented-item">
<input type="radio" class="segmented-input"
name="forge-view" value="timeline">
Timeline
</label>
</div>
</template>스타일시트만으로 렌더링
프레임워크가 다음 중 하나를 관리할 때 전용 컴포넌트를 사용합니다
전송 크기
각 컴포넌트는 공통 테마를 바탕으로 자체 스타일시트를 사용하며, 대부분은 스크립트 없이 동작합니다. 페이지에 쓰는 컴포넌트만 선택하세요. 모든 크기는 빌드 시점에 측정합니다.
선택한 항목 없음
‘전체’에서 페이지에 쓰는 항목을 고르세요.
크기 단위 kB, 컴파일 후JS 스크립트 필요JS? 스크립트 선택 사항
| 스타일시트 | 스크립트 | 컴파일 후, kB |
|---|---|---|
| 테마 | 없음 | 20.5 |
| 카드 | 없음 | 6.0 |
| 카테고리 색상 입력 필드에 포함 | 없음 | 5.8 |
| 아이콘 버튼에 포함 | 없음 | 0.3 |
| 버튼 | 없음 | 11.5 |
| 입력 필드 | 없음 | 20.0 |
| 셀렉트 | 없음 | 8.2 |
| 체크박스 | 없음 | 3.7 |
| 스위치 | 없음 | 3.3 |
| 칩 입력 필드에 포함 | 없음 | 7.9 |
| 탭 | tabs.js, optional | 3.0 |
| 대화 상자 | drawer.js, optional | 10.3 |
| 툴팁 | 없음 | 3.0 |
| 스피너 버튼에 포함 | 없음 | 1.2 |
| 아바타 입력 필드에 포함 | avatar.js, optional | 4.2 |
| 배지 | 없음 | 6.7 |
| 키캡 입력 필드에 포함 | 없음 | 0.9 |
스타일시트 16개
CSS, gzip 압축 후
18.0kB
전체 라이브러리의 21% · gzip 압축 후 87.2 kB
컴파일 후 116.5 kB입니다(테마 1회 + 스타일시트 16개). 그중 6개는 다른 컴포넌트와 함께 불러옵니다.
JavaScript, gzip 압축 후
0kB
전체 동작 스크립트의 0% · gzip 압축 후 94.9 kB
스크립트가 필요 없습니다. 네이티브 요소와 그 속성만으로 모든 상태를 표현합니다. 선택 사항으로 표시된 항목은 계산에서 제외합니다.
drawer.js대화 상자에서 선택적으로 사용1.8 kBtabs.js탭에서 선택적으로 사용1.4 kBdist/standalone.css를 생성할 때와 같은 방식으로 컴파일합니다. 코드를 축소하지 않고 파일 하나를 통째로 gzip 압축합니다. 압축된 크기는 단순히 더할 수 없으므로, 이 페이지에서는 배포 파일에서 선택한 부분을 추출해 선택할 때마다 gzip으로 압축합니다.base.css는 자체 리셋이 없는 프로젝트에 gzip 압축 기준 1.7 kB를 더합니다.internal.js를 19개의 동작에서 공유하므로 한 번만 계산합니다. 1 kB는 1,000바이트입니다.비교
자주 쓰는 컴포넌트 여섯 개를 Master UI와 shadcn/ui로 각각 프로덕션 빌드하고, 같은 스크립트로 측정했습니다. 여섯 컴포넌트를 한 페이지에 배치했을 때 gzip 압축 기준 Master UI는 12.8 kB, Base UI 기반의 shadcn/ui는 149.2 kB입니다. 두 크기의 차이는 JavaScript에서 발생합니다.
벤치마크 살펴보기 및 실행| 컴포넌트 | 첫 로드, gzip 압축 후, kB합계CSSJS |
|---|---|
| 초기 설정만 포함컴포넌트 없음 | |
| 버튼 | |
| 카드 | |
| 대화 상자 | |
| 탭Master UI · tabs.js | |
| 셀렉트Master UI · 네이티브, 스크립트 없음 | |
| 툴팁 | |
| 여섯 개 모두11.7× Master UI로 빌드한 쪽이 더 작음6.4× Master UI로 빌드한 쪽이 더 작음10.0× Master UI로 빌드한 쪽이 더 작음4.7× Master UI로 빌드한 쪽이 더 작음 |
계약
컴포넌트마다 사용 시점, 클래스, 상태, 키보드 조작, 올바른 예제를 담은 계약이 있습니다. 에이전트는 마크업을 작성하기 전에 계약을 읽고, 검사기는 계약에 어긋나는 마크업을 표시합니다.
@master/ui/check 이 페이지의 빌드 시점 기준즉시 적용되는 설정에 사용합니다. 진주빛 손잡이가 전경색으로 채워진 트랙 위로 미끄러져 이동합니다.
켜거나 끌 수 있고 저장 버튼 없이 즉시 적용되는 설정.
<input type="checkbox" role="switch">labelof switchexclusive: sizeof switchexclusive: size:checkeddisabled상태는 속성이나 의사 클래스로 표시하며, CSS 클래스로는 표시하지 않습니다.
파일에 함께 포함된 항목: instead · composes
settings.html초안
<label class="check"> <input type="checkbox" class="switch switch-on" checked> Email notifications</label>터미널exit 1
npx master-ui check settings.htmlsettings.html:2:3 error attribute "switch" needs role="switch" on its element.settings.html:2:3 warning unknown-class "switch-on" is not a class of switch. It has: switch, switch-sm, switch-lg.1 files checked: 1 errors, 1 warnings.줄 2, 예제를 바탕으로 다시 작성
변경 전: <input type="checkbox" class="switch switch-on" checked>변경 후: <input type="checkbox" role="switch" class="switch" checked>터미널exit 0
npx master-ui check settings.html1 files checked: 0 errors, 0 warnings./ko/llms.txtMaster UI 마크업 작성 규칙과 페이지별 Markdown 링크입니다.
/contracts.json마크업을 생성하는 프로그램이 읽을 수 있도록 모든 계약을 데이터로 제공합니다.
npx skills add master-co/ui --skill master-ui에이전트가 계약을 읽고 마크업을 검사한 뒤 브라우저에서 결과를 확인하는 데 쓰는 스킬입니다.
npx master-ui add <name>React, Svelte, Vue용 컴포넌트를 프로젝트에 소스로 복사할 수 있습니다. shadcn 형식의 레지스트리도 제공합니다.
라이브러리
컴포넌트마다 직접 조작할 수 있는 미리보기와 마크업, 코딩 에이전트가 읽는 계약을 제공합니다. 차트는 스무 가지가 넘는 형태로 데이터를 그립니다. 블록은 컴포넌트를 조합해 제품의 각 부분을 만들고, 페이지는 화면 전체의 틀을 잡습니다. 무엇이든 프로젝트에 복사해 내 코드로 계속 쓸 수 있습니다.
패키지를 설치하고 스타일시트를 가져온 뒤 네이티브 요소에 클래스를 붙이세요. 모든 컴포넌트는 순수 HTML에서도, 어떤 프레임워크에서든 사용할 수 있습니다.