로그인은 모든 제품에 있는 화면입니다. 이 블록은 제목, 빠른 로그인 수단, 구분선, 입력 필드, 다른 카드로 이동하는 링크를 담은 카드입니다. 볼록한 표면이면서 폼이므로 필드 간격이 일정하고 요소가 자동으로 세로로 쌓입니다.
로그인
<form class="sheet form w-full max-w(380) p-xl"> <header class="flex flex-col items-center gap-xs text-center"> <span class="fg-text-strong"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="8" cy="8" r="6" /><path d="M8 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" /> </svg> </span> <h1 class="heading heading-lg">Sign in to Atlas</h1> <p class="m(0) fg-text-muted">Welcome back. Pick up where you left off.</p> </header> <div class="flex flex-col gap-xs"> <button type="button" class="btn"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="4" cy="3.6667" r="1.6667" /><circle cx="4" cy="12.3333" r="1.6667" /><circle cx="12" cy="3.6667" r="1.6667" /><path d="M4 5.3333L4 10.6667" /><path d="M12 5.3333C12 9.6667 4 7.3333 4 10.6667" /> </svg>Continue with GitHub </button> <button type="button" class="btn"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="10.6667" cy="5" r="3" /><path d="M8.5467 7.12L2.3333 13.3333" /><path d="M4 11.6667L5.3333 13" /><path d="M6 9.6667L7.3333 11" /> </svg>Continue with a passkey </button> </div> <div class="divider divider-label" role="separator">or</div> <label class="field"> Email<input class="input" type="email" name="email" autocomplete="username" placeholder="you@example.com" required> </label> <div class="field"> <div class="flex items-baseline justify-between gap-sm"> <label for="signin-password">Password</label> <a class="link link-quiet text-xs fg-text-muted" href="#">Forgot it?</a> </div> <input class="input" id="signin-password" type="password" name="password" autocomplete="current-password" required> </div> <label class="check"> <input type="checkbox" class="checkbox" name="remember" checked> Keep me signed in on this device </label> <button class="btn btn-primary">Sign in</button> <p class="m(0) text-center fg-text-muted"> New here? <a class="link" href="#">Create an account</a> </p></form>import ContrastIcon from '@master/icons-react/native/16/soft/contrast'import GitBranchIcon from '@master/icons-react/native/16/soft/git-branch'import KeyIcon from '@master/icons-react/native/16/soft/key'<form className="sheet form w-full max-w(380) p-xl"> <header className="flex flex-col items-center gap-xs text-center"> <span className="fg-text-strong"><ContrastIcon className="icon" /></span> <h1 className="heading heading-lg">Sign in to Atlas</h1> <p className="m(0) fg-text-muted">Welcome back. Pick up where you left off.</p> </header> <div className="flex flex-col gap-xs"> <button type="button" className="btn"> <GitBranchIcon className="icon" />Continue with GitHub </button> <button type="button" className="btn"> <KeyIcon className="icon" />Continue with a passkey </button> </div> <div className="divider divider-label" role="separator">or</div> <label className="field"> Email<input className="input" type="email" name="email" autoComplete="username" placeholder="you@example.com" required /> </label> <div className="field"> <div className="flex items-baseline justify-between gap-sm"> <label htmlFor="signin-password">Password</label> <a className="link link-quiet text-xs fg-text-muted" href="#">Forgot it?</a> </div> <input className="input" id="signin-password" type="password" name="password" autoComplete="current-password" required /> </div> <label className="check"> <input type="checkbox" className="checkbox" name="remember" defaultChecked /> Keep me signed in on this device </label> <button className="btn btn-primary">Sign in</button> <p className="m(0) text-center fg-text-muted"> New here? <a className="link" href="#">Create an account</a> </p></form><script> import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast' import GitBranchIcon from '@master/icons-svelte/native/16/soft/git-branch' import KeyIcon from '@master/icons-svelte/native/16/soft/key'</script><form class="sheet form w-full max-w(380) p-xl"> <header class="flex flex-col items-center gap-xs text-center"> <span class="fg-text-strong"><ContrastIcon class="icon" /></span> <h1 class="heading heading-lg">Sign in to Atlas</h1> <p class="m(0) fg-text-muted">Welcome back. Pick up where you left off.</p> </header> <div class="flex flex-col gap-xs"> <button type="button" class="btn"><GitBranchIcon class="icon" />Continue with GitHub</button> <button type="button" class="btn"><KeyIcon class="icon" />Continue with a passkey</button> </div> <div class="divider divider-label" role="separator">or</div> <label class="field"> Email<input class="input" type="email" name="email" autocomplete="username" placeholder="you@example.com" required> </label> <div class="field"> <div class="flex items-baseline justify-between gap-sm"> <label for="signin-password">Password</label> <a class="link link-quiet text-xs fg-text-muted" href="#">Forgot it?</a> </div> <input class="input" id="signin-password" type="password" name="password" autocomplete="current-password" required> </div> <label class="check"> <input type="checkbox" class="checkbox" name="remember" checked> Keep me signed in on this device </label> <button class="btn btn-primary">Sign in</button> <p class="m(0) text-center fg-text-muted"> New here? <a class="link" href="#">Create an account</a> </p></form><script setup>import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import GitBranchIcon from '@master/icons-vue/native/16/soft/git-branch'import KeyIcon from '@master/icons-vue/native/16/soft/key'</script><template> <form class="sheet form w-full max-w(380) p-xl"> <header class="flex flex-col items-center gap-xs text-center"> <span class="fg-text-strong"><ContrastIcon class="icon" /></span> <h1 class="heading heading-lg">Sign in to Atlas</h1> <p class="m(0) fg-text-muted">Welcome back. Pick up where you left off.</p> </header> <div class="flex flex-col gap-xs"> <button type="button" class="btn"><GitBranchIcon class="icon" />Continue with GitHub</button> <button type="button" class="btn"><KeyIcon class="icon" />Continue with a passkey</button> </div> <div class="divider divider-label" role="separator">or</div> <label class="field"> Email<input class="input" type="email" name="email" autocomplete="username" placeholder="you@example.com" required> </label> <div class="field"> <div class="flex items-baseline justify-between gap-sm"> <label for="signin-password">Password</label> <a class="link link-quiet text-xs fg-text-muted" href="#">Forgot it?</a> </div> <input class="input" id="signin-password" type="password" name="password" autocomplete="current-password" required> </div> <label class="check"> <input type="checkbox" class="checkbox" name="remember" checked> Keep me signed in on this device </label> <button class="btn btn-primary">Sign in</button> <p class="m(0) text-center fg-text-muted"> New here? <a class="link" href="#">Create an account</a> </p> </form></template>블록은 복사해서 사용하는 마크업입니다. 페이지의 텍스트 색상과 크기를 그대로 사용하며, 미리보기에서는 본문에 fg-text-body text-sm을 설정합니다. 각 블록은 크기 컨테이너이므로 넓은 페이지, 사이드바 정도의 공간, 대화 상자 어디서든 자체 너비에 맞춰 배치가 바뀝니다. 페이지에서 카드를 가운데에 배치하려면 가운데 정렬 레이아웃을 사용하세요.
#구성
sheet form w-full max-w(380) p-xl. 카드는 휴대전화 화면 너비를 채우며 최대 너비는 380px입니다.form으로 카드 안의 모든 요소 사이 간격을 설정합니다.- 빠른 로그인 수단을 먼저 배치하세요. 외부 인증 서비스와 패스키로는 각각 한 번의 클릭으로 로그인할 수 있으며, 비밀번호는 폴백입니다. ‘또는’이 들어간 구분선으로 빠른 로그인 수단과 비밀번호 입력을 나눕니다.
- ‘비밀번호를 잊으셨나요?’는 레이블 옆에 배치하고 필드 아래에는 두지 않습니다. 레이블 행 끝의 링크에
link-quiet를 적용해 텍스트 색상을 덜 강조하면 버튼의 시각적 비중을 유지하면서도 링크를 쉽게 찾을 수 있습니다. 필드가 레이블 안에 있지 않으므로for속성으로 레이블과 필드를 연결합니다. - 주요 버튼은 하나만 두고, 마지막 컨트롤로 배치하며 너비는 필드와 맞춥니다.
- 다른 카드로 이동하는 안내는 버튼 아래에 한 줄로 표시하고 링크는 하나만 둡니다.
필드의 autocomplete 값으로 username과 current-password를 지정하면 비밀번호 관리자가 필드를 자동으로 채울 수 있습니다.
#회원가입
같은 카드에 필드를 더 추가합니다. 이름을 이루는 두 짧은 필드는 grid grid-cols(2) gap-sm로 한 행에 배치합니다. form-row는 폼 너비가 28rem에 도달해야 필드를 나란히 배치하므로, 너비가 22rem인 이 카드에서는 한 행으로 배치되지 않습니다. 비밀번호 규칙은 field-hint로 표시하고 aria-describedby 속성으로 입력 필드와 연결해 사용자가 잘못 입력하기 전에 확인할 수 있도록 합니다.
회원가입
<form class="sheet form w-full max-w(420) p-xl"> <header class="flex flex-col gap-xs"> <h1 class="heading heading-lg">Create your account</h1> <p class="m(0) fg-text-muted">Free for personal projects. No card needed.</p> </header> <div class="grid grid-cols(2) gap-sm"> <label class="field"> First name<input class="input" name="given-name" autocomplete="given-name" required> </label> <label class="field"> Last name<input class="input" name="family-name" autocomplete="family-name" required> </label> </div> <label class="field"> Work email<input class="input" type="email" name="email" autocomplete="email" placeholder="you@company.com" required> </label> <div class="field"> <label for="signup-password">Password</label> <input class="input" id="signup-password" type="password" name="password" autocomplete="new-password" minlength="12" required aria-describedby="signup-hint"> <span class="field-hint" id="signup-hint">At least 12 characters. A sentence works well.</span> </div> <label class="check"> <input type="checkbox" class="checkbox" name="terms" required><span> I agree to the <a class="link" href="#">terms</a> and the <a class="link" href="#">privacy policy</a> </span> </label> <button class="btn btn-primary">Create account</button> <p class="m(0) text-center fg-text-muted"> Already have one? <a class="link" href="#">Sign in</a> </p></form><form className="sheet form w-full max-w(420) p-xl"> <header className="flex flex-col gap-xs"> <h1 className="heading heading-lg">Create your account</h1> <p className="m(0) fg-text-muted">Free for personal projects. No card needed.</p> </header> <div className="grid grid-cols(2) gap-sm"> <label className="field"> First name<input className="input" name="given-name" autoComplete="given-name" required /> </label> <label className="field"> Last name<input className="input" name="family-name" autoComplete="family-name" required /> </label> </div> <label className="field"> Work email<input className="input" type="email" name="email" autoComplete="email" placeholder="you@company.com" required /> </label> <div className="field"> <label htmlFor="signup-password">Password</label> <input className="input" id="signup-password" type="password" name="password" autoComplete="new-password" minLength={12} required aria-describedby="signup-hint" /> <span className="field-hint" id="signup-hint"> At least 12 characters. A sentence works well. </span> </div> <label className="check"> <input type="checkbox" className="checkbox" name="terms" required /><span> I agree to the <a className="link" href="#">terms</a> and the <a className="link" href="#">privacy policy</a> </span> </label> <button className="btn btn-primary">Create account</button> <p className="m(0) text-center fg-text-muted"> Already have one? <a className="link" href="#">Sign in</a> </p></form><form class="sheet form w-full max-w(420) p-xl"> <header class="flex flex-col gap-xs"> <h1 class="heading heading-lg">Create your account</h1> <p class="m(0) fg-text-muted">Free for personal projects. No card needed.</p> </header> <div class="grid grid-cols(2) gap-sm"> <label class="field"> First name<input class="input" name="given-name" autocomplete="given-name" required> </label> <label class="field"> Last name<input class="input" name="family-name" autocomplete="family-name" required> </label> </div> <label class="field"> Work email<input class="input" type="email" name="email" autocomplete="email" placeholder="you@company.com" required> </label> <div class="field"> <label for="signup-password">Password</label> <input class="input" id="signup-password" type="password" name="password" autocomplete="new-password" minlength="12" required aria-describedby="signup-hint"> <span class="field-hint" id="signup-hint">At least 12 characters. A sentence works well.</span> </div> <label class="check"> <input type="checkbox" class="checkbox" name="terms" required><span> I agree to the <a class="link" href="#">terms</a> and the <a class="link" href="#">privacy policy</a> </span> </label> <button class="btn btn-primary">Create account</button> <p class="m(0) text-center fg-text-muted"> Already have one? <a class="link" href="#">Sign in</a> </p></form><template> <form class="sheet form w-full max-w(420) p-xl"> <header class="flex flex-col gap-xs"> <h1 class="heading heading-lg">Create your account</h1> <p class="m(0) fg-text-muted">Free for personal projects. No card needed.</p> </header> <div class="grid grid-cols(2) gap-sm"> <label class="field"> First name<input class="input" name="given-name" autocomplete="given-name" required> </label> <label class="field"> Last name<input class="input" name="family-name" autocomplete="family-name" required> </label> </div> <label class="field"> Work email<input class="input" type="email" name="email" autocomplete="email" placeholder="you@company.com" required> </label> <div class="field"> <label for="signup-password">Password</label> <input class="input" id="signup-password" type="password" name="password" autocomplete="new-password" minlength="12" required aria-describedby="signup-hint"> <span class="field-hint" id="signup-hint"> At least 12 characters. A sentence works well. </span> </div> <label class="check"> <input type="checkbox" class="checkbox" name="terms" required><span> I agree to the <a class="link" href="#">terms</a> and the <a class="link" href="#">privacy policy</a> </span> </label> <button class="btn btn-primary">Create account</button> <p class="m(0) text-center fg-text-muted"> Already have one? <a class="link" href="#">Sign in</a> </p> </form></template>첫 화면에 필요한 정보만 요청하세요. 필드가 하나 늘어날 때마다 가입을 시작한 사용자 중 일부가 이탈합니다.
#인증
코드를 보낸 뒤 사용자가 할 일은 코드 입력뿐입니다. 가운데에 OTP 필드를 두고, 코드를 보낸 주소는 기본 텍스트 색상으로 표시하며, 재전송 기능은 시각적으로 덜 강조합니다.
인증
<form class="sheet form w-full max-w(380) p-xl"> <header class="flex flex-col items-center gap-xs text-center"> <span class="icon-frame" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <rect x="2.5" y="5" width="15" height="10" rx="1.25" /><path d="M3 6.5L9.8918 10.9305A0.2 0.2 0 0 0 10.1082 10.9305L17 6.5" /> </svg> </span> <h1 class="heading heading-lg mt-xs">Check your email</h1> <p class="m(0) fg-text-muted"> We sent a six-digit code to <span class="fg-text-strong">yiching@atlaslabs.dev</span>. It works for ten minutes. </p> </header> <fieldset class="otp mx-auto" aria-label="Verification code"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" autocomplete="one-time-code" aria-label="Digit 1" value="4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 2" value="2"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 3"> <span class="otp-separator" aria-hidden="true"></span> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 5"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 6"> </fieldset> <button class="btn btn-primary">Verify</button> <p class="m(0) text-center fg-text-muted"> Nothing arrived? <button type="button" class="link">Send it again</button> </p></form><script type="module"> import { attach } from '@master/ui/behaviors' attach()</script>import { useEffect, useRef } from 'react'import { attach } from '@master/ui/behaviors'import MailIcon from '@master/icons-react/native/20/soft/mail'export function Example() { const root = useRef<HTMLFormElement>(null) useEffect(() => attach(root.current!), []) return ( <form ref={root} className="sheet form w-full max-w(380) p-xl"> <header className="flex flex-col items-center gap-xs text-center"> <span className="icon-frame" aria-hidden="true"><MailIcon className="icon" /></span> <h1 className="heading heading-lg mt-xs">Check your email</h1> <p className="m(0) fg-text-muted"> We sent a six-digit code to <span className="fg-text-strong">yiching@atlaslabs.dev</span>. It works for ten minutes. </p> </header> <fieldset className="otp mx-auto" aria-label="Verification code"> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} autoComplete="one-time-code" aria-label="Digit 1" defaultValue="4" /> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} aria-label="Digit 2" defaultValue="2" /> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} aria-label="Digit 3" /> <span className="otp-separator" aria-hidden="true"></span> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} aria-label="Digit 4" /> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} aria-label="Digit 5" /> <input className="otp-slot" inputMode="numeric" pattern="[0-9]" maxLength={1} aria-label="Digit 6" /> </fieldset> <button className="btn btn-primary">Verify</button> <p className="m(0) text-center fg-text-muted"> Nothing arrived? <button type="button" className="link">Send it again</button> </p> </form> )}<script> import { attach } from '@master/ui/behaviors' import MailIcon from '@master/icons-svelte/native/20/soft/mail'</script><form class="sheet form w-full max-w(380) p-xl" {@attach attach}> <header class="flex flex-col items-center gap-xs text-center"> <span class="icon-frame" aria-hidden="true"><MailIcon class="icon" /></span> <h1 class="heading heading-lg mt-xs">Check your email</h1> <p class="m(0) fg-text-muted"> We sent a six-digit code to <span class="fg-text-strong">yiching@atlaslabs.dev</span>. It works for ten minutes. </p> </header> <fieldset class="otp mx-auto" aria-label="Verification code"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" autocomplete="one-time-code" aria-label="Digit 1" value="4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 2" value="2"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 3"> <span class="otp-separator" aria-hidden="true"></span> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 5"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 6"> </fieldset> <button class="btn btn-primary">Verify</button> <p class="m(0) text-center fg-text-muted"> Nothing arrived? <button type="button" class="link">Send it again</button> </p></form><script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach } from '@master/ui/behaviors'import MailIcon from '@master/icons-vue/native/20/soft/mail'const root = ref(null)let detachonMounted(() => { detach = attach(root.value) })onUnmounted(() => detach?.())</script><template> <form ref="root" class="sheet form w-full max-w(380) p-xl"> <header class="flex flex-col items-center gap-xs text-center"> <span class="icon-frame" aria-hidden="true"><MailIcon class="icon" /></span> <h1 class="heading heading-lg mt-xs">Check your email</h1> <p class="m(0) fg-text-muted"> We sent a six-digit code to <span class="fg-text-strong">yiching@atlaslabs.dev</span>. It works for ten minutes. </p> </header> <fieldset class="otp mx-auto" aria-label="Verification code"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" autocomplete="one-time-code" aria-label="Digit 1" value="4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 2" value="2"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 3"> <span class="otp-separator" aria-hidden="true"></span> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 4"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 5"> <input class="otp-slot" inputmode="numeric" pattern="[0-9]" maxlength="1" aria-label="Digit 6"> </fieldset> <button class="btn btn-primary">Verify</button> <p class="m(0) text-center fg-text-muted"> Nothing arrived? <button type="button" class="link">Send it again</button> </p> </form></template>otp 동작은 포커스를 다음 칸으로 옮기고, 붙여넣은 코드를 각 칸에 나눠 입력합니다. 이 동작이 없어도 각 칸은 숫자 한 자리를 입력할 수 있는 필드입니다. ‘다시 보내기’는 링크처럼 표시하는 <button>입니다. 화면 이동 없이 현재 화면에서 코드를 다시 보냅니다.
#접근성
- 카드 제목은 페이지의
<h1>입니다. - 모든 필드에 화면에 표시되는 레이블을 둡니다. 플레이스홀더는 입력 예시를 보여 주는 용도로 사용하고, 필드 이름은 레이블에 표시합니다.
- 오류는 해당 필드와 함께 표시합니다.
field-error를 추가하면 필드가 유효하지 않은 동안 오류가 표시됩니다. 입력 필드를 참고하세요. - 폼이 유효해질 때까지 버튼을 비활성화해 두지 마세요. 비활성화된 버튼으로는 누락된 항목을 안내할 수 없지만, 폼을 제출하면 어떤 항목이 빠졌는지 안내할 수 있습니다.
- 긴 비밀번호를 입력할 때는 ‘비밀번호 표시’ 기능을 고려하세요. 입력 그룹 안에 시각적으로 덜 강조된 버튼을 두어 필드의
type을 전환합니다.
#관련 항목
- 폼열 너비에 맞춰 행, 섹션, 동작 버튼을 배치하는 폼 레이아웃입니다.
- 표면모든 컴포넌트의 바탕이 되는 트레이, 볼록한 표면, 오목한 영역의 높이 체계입니다.
- 제목페이지의 기본 글자색으로 표시하는 제목과 제목 위 안내 문구, 아래 소개 문단입니다.
- 아이콘 프레임제목 옆에 아이콘을 크기에 맞게 담는 작은 오목한 영역입니다.
- 입력 필드표면을 파낸 듯한 텍스트 입력 필드와 레이블, 힌트, 오류, 입력 그룹.
- 체크박스선택하면 잉크 색으로 채워지는 작은 오목한 영역 형태의 네이티브 입력 요소입니다.
- OTP문자 메시지로 받은 6자리 숫자처럼 일회용 코드를 한 칸에 한 글자씩 입력하는 필드입니다.
- 구분선섹션 사이에 놓이는 가느다란 선으로, 필요에 따라 레이블을 넣을 수 있습니다.
- 버튼표면 위로 살짝 돌출되어 있으며, 포인터를 올리면 떠오르고 누르면 가라앉는 버튼입니다.
- 링크문장 속에서 주변 텍스트와 같은 색으로 표시되며 다른 위치로 이동하는 텍스트입니다.