2026년 10월 3일 기준 네이티브 DADS HTML 입력 및 버튼 스타일, design-tokens 2.0.1, 자체 레이아웃과 로컬 조회 로직. · 구현 레퍼런스
02
Digital Agency 디자인 시스템 디자인 레퍼런스
DADS beta v2.18.0 문서, 2026년 10월 3일에 확인한 네이티브 HTML 샘플 스타일, design-tokens 2.0.1. 문서, 샘플 저장소, 토큰 패키지는 각각 별도의 버전 이력을 따릅니다. 아래 레이아웃 선택은 공식 컴포넌트 값과 명확히 구분되어 있습니다.
공식 리소스 색인에서는 HTML/CSS/JavaScript 샘플, React/Tailwind 샘플, Tailwind 플러그인, Figma 디자인 데이터를 제공합니다. 이 예제에서는 순수 HTML 경로를 선택합니다. 입력과 버튼 CSS는 변경 없이 복사하고, 주변의 상태 조회와 클라이언트 측 유효성 검사는 애플리케이션 코드로 구현합니다. 모든 상황에 적용되는 DADS 컴포넌트 패키지를 임의로 만들어 제시하지 않습니다.
미리보기는 가상의 독립적인 지방자치단체 절차 조회 서비스입니다. 정부 웹사이트의 상단 헤더를 재현하거나, 공공 데이터베이스에 질의하거나, 공식 서비스 상태를 주장하지 않습니다. 접수증 형식과 상태 기록은 예시 데이터입니다.
Std-17N-170은 줄 간격이 단위 없는 1.7이고 글자 크기는 17px인 일반 굵기 글꼴을 나타냅니다. 미리보기에서는 본문에 이 읽기 리듬을 적용하고 제목에는 줄 간격 1.5의 32px 굵은 글꼴을 사용합니다. 문서에 지정된 산세리프 글꼴은 Noto Sans JP이며, 웹폰트가 로드되지 않으면 시스템 대체 글꼴을 사용할 수 있습니다. 이 로컬 예제에서는 의도적으로 대체 글꼴을 사용합니다.
일본어와 영어 텍스트는 같은 너비를 차지하지 않습니다. 컨트롤 위에 라벨을 표시하고, 제목은 줄바꿈되도록 하며, 글자 수를 가정해 버튼 크기를 정하지 마세요. 번역된 문구는 컴포넌트 역할을 바꾸지 않더라도 세로 공간을 더 차지할 수 있습니다.
샘플 버튼은 기본 색상을 --color-key-900에서 가져옵니다. 배포되는 토큰 스타일시트는 이 별칭을 blue-900, #0017c1로 해석합니다. 호버 및 활성 상태에는 임의의 투명도를 적용하는 대신 key-1000과 key-1200을 지정합니다. 입력 오류 테두리는 --color-semantic-error-1을 사용합니다.
컨트롤에 키보드 포커스가 가면 검은색 윤곽선과 노란색 그림자가 계속 표시됩니다. 컨트롤이 잘릴 수 있는 컨테이너에서 떨어뜨려 배치하세요. overflow-hidden이 적용된 카드에서는 컴포넌트 CSS가 올바르더라도 포커스 링이 잘릴 수 있습니다. 오류 텍스트와 aria-invalid 속성을 빨간색 테두리와 함께 사용하세요.
DADS 간격 가이드에는 예시가 제시되어 있으며, 모든 인터페이스에 하나의 필수 간격 순서를 적용하지는 않습니다. 이 구성에서는 관련 요소 안에 8px, 폼 섹션 사이에 24px, 데스크톱 페이지 여백에는 넉넉하게 64px을 사용합니다. 콘텐츠 최대 너비인 52rem은 애플리케이션에서 정한 값이지 DADS 토큰이 아닙니다.
좁은 화면에서는 결과 정의 목록이 세로로 쌓이고 컨트롤이 사용 가능한 너비를 모두 차지합니다. 이 예시에서만 768px 미디어 쿼리를 사용합니다. 이를 DADS의 보편적인 중단점으로 제시하는 것은 아닙니다. 콘텐츠 줄바꿈과 버튼의 최소 크기가 변경의 근거입니다.
기본 제공되는 .dads-input-text 래퍼가 텍스트 기본값을 정의합니다. .dads-input-text__input 자식 요소는 크기, 테두리, 안쪽 여백, 모서리 반경, 포커스 상태를 담당합니다. 함께 제공되는 레이블은 for/id로 명시적으로 연결합니다. 오류가 발생해도 안내 문구를 표시해 예상 입력 형식을 계속 확인할 수 있게 합니다.
이 예시는 ASCII 숫자 6자리만 허용합니다. 형식에 맞지 않는 값이 입력되면 aria-invalid=true를 설정하고 연결된 오류 메시지를 표시한 다음 입력란으로 포커스를 돌려보냅니다. 123456이 아닌 형식상 유효한 값에는 별도의 일치 항목 없음 메시지를 표시하며, 이를 형식 오류로 설명하지 않습니다. 두 동작은 모두 이 예시에만 적용되는 규칙입니다.
참조 번호는 수량이 아닌 식별자이므로 입력 유형은 텍스트로 유지하세요.
숫자 키보드를 유도하는 힌트로 inputmode=numeric을 사용하고, 숫자 입력용 스핀 버튼은 표시하지 마세요.
채움 스타일의 Large 버튼은 조회를 실행하고, 텍스트 스타일 버튼은 예시를 초기화합니다. 기본 제공되는 data-type 값은 solid-fill, outline, text이며, data-size는 lg, md, sm, xs 중 하나를 선택합니다. 이는 샘플의 HTML 속성이며 React props가 아닙니다.
대형 버튼의 최소 너비는 136px, 높이는 56px입니다. 레이블에 더 많은 공간이 필요하면 버튼이 확장될 수 있습니다. 제공된 CSS에서는 small 및 extra-small 변형의 클릭 영역을 넓혀 둡니다. 이 영역 안에 인접한 클릭 대상을 배치하지 마세요. 이 충돌을 피하기 위해 데모에서는 더 큰 변형을 사용합니다.
123456을 입력하면 참조 번호, 제출 날짜, 다음 동작을 정의 목록으로 보여 주는 가상의 접수 내역이 표시됩니다. 조회 후 제목에 포커스를 두어 키보드 사용자가 새 결과로 바로 이동할 수 있게 합니다. 일치 항목 없음 상태에도 포커스를 두고 다시 시도할 수 있는 경로를 제공합니다.
3단계 목록은 이 예시를 위해 작성한 애플리케이션 마크업입니다. 접수, 확인 중, 결정 상태를 형태와 색상뿐 아니라 텍스트로도 구분합니다. 실제 구현에서는 서비스에서 해당 값을 가져오고, 권한 없음, 이용 불가, 만료된 기록을 처리해야 합니다. 이 미리보기는 외부 요청을 보내지 않으며 실제 민원인 기록을 조회한 것처럼 보이지 않습니다.
토큰 패키지는 dist/tokens.css를 제공합니다. HTML 예시는 Storybook 스크립트가 포함된 소스 저장소입니다. 이 저장소를 복제하면 코드를 살펴볼 수 있는 환경이 마련됩니다. 필요한 컴포넌트 스타일을 라이선스와 함께 복사하고, 프로덕션에 맞게 수정하기 전에 소스 리비전을 기록하세요.
이 페이지에서 토큰 패키지는 2.0.1로 고정되어 있으며, HTML 스타일은 날짜가 지정된 소스 스냅샷입니다. 독립형 데모는 로컬 파일을 불러오므로, 검증된 렌더링이 실시간 CDN에 의존하지 않습니다. Storybook 설정 명령은 공식 저장소의 진입 경로로 제공됩니다. 이 미리보기를 위해 새로 의존성을 설치하지는 않았습니다.
<div class="dads-input-text">
<label for="reference">Reference number (required)</label>
<p id="reference-hint">Use the 6 digits on your example receipt.</p>
<input class="dads-input-text__input" data-size="lg"
id="reference" inputmode="numeric" autocomplete="off"
aria-describedby="reference-hint reference-error" aria-invalid="true">
<span class="dads-input-text__error-text" id="reference-error">
Enter 6 digits, for example 123456.
</span>
</div>
전체 문서에 레이아웃, 컨트롤 및 초기화가 포함되어 있습니다. 링크된 예시 아카이브의 압축을 풀면 정확한 상대 경로의 벤더 에셋을 얻을 수 있습니다. 그런 다음 HTTP로 제공하세요.
html
<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>DADS procedure receipt example</title><link rel="stylesheet" href="vendor/dads-2026-10-03/tokens.css"><link rel="stylesheet" href="vendor/dads-2026-10-03/input-text.css"><link rel="stylesheet" href="vendor/dads-2026-10-03/button.css"><style>
*{box-sizing:border-box}body{margin:0;color:var(--color-neutral-solid-gray-900);font:400 17px/1.7 var(--font-family-sans);background:#fff}.lookup{max-width:52rem;padding:64px 24px;margin:auto}.eyebrow{font-size:14px;letter-spacing:.08em;border-bottom:1px solid #b3b3b3;padding-bottom:16px}h1{font-size:32px;line-height:1.5;margin:24px 0}h2{font-size:24px;line-height:1.5}p{margin:8px 0 24px}.field{margin:32px 0}label{font-weight:700;display:block}.dads-input-text__input{width:22rem}#reference-hint{margin:8px 0}.actions{display:flex;gap:24px;flex-wrap:wrap;align-items:center;margin:24px 0}.result{border-top:4px solid var(--color-key-900);background:#f5f5f5;padding:24px;margin-top:32px}.result:focus{outline:3px solid #111;outline-offset:4px}dl{display:grid;grid-template-columns:10rem 1fr;gap:16px}dt{font-weight:700}dd{margin:0;overflow-wrap:anywhere}ol{padding-left:24px}li{padding:8px}li.current{font-weight:700;color:var(--color-key-900)}small{display:block;font-size:14px;margin-top:32px;color:#555}[hidden]{display:none!important}@media(max-width:767px){.lookup{padding:24px}h1{font-size:28px}.actions{align-items:stretch;flex-direction:column}.actions button{width:100%}dl{grid-template-columns:1fr;gap:4px}dd{margin-bottom:16px}}
</style><main class="lookup"><div class="eyebrow">SERVICE PATTERN · DADS HTML</div><h1>Check a procedure receipt</h1><p>Use the reference from your receipt to view the next step. This is a fictional local example.</p><form id="lookup-form" novalidate><div class="dads-input-text field"><label for="reference">Reference number (required)</label><p id="reference-hint">Enter 6 digits. Try <strong>123456</strong> for the example record.</p><input id="reference" class="dads-input-text__input" data-size="lg" inputmode="numeric" autocomplete="off" aria-describedby="reference-hint reference-error"><span id="reference-error" class="dads-input-text__error-text" hidden>Enter 6 digits, for example 123456.</span></div><div class="actions"><button class="dads-button" data-type="solid-fill" data-size="lg" type="submit">Show example status</button><button class="dads-button" data-type="text" data-size="md" type="reset">Clear reference</button></div></form><section class="result" id="missing" tabindex="-1" hidden><h2>No matching example</h2><p>This reference has the correct format, but is not in the local example data. Try 123456.</p></section><section class="result" id="found" tabindex="-1" hidden><h2>Receipt 123456</h2><dl><dt>Procedure</dt><dd>Community room request</dd><dt>Submitted</dt><dd>1 October 2026 — fictional date</dd><dt>Next action</dt><dd>Wait for the example review. No documents are currently requested.</dd></dl><ol aria-label="Procedure progress"><li>Received</li><li class="current" aria-current="step">Checking the request — current step</li><li>Decision — not started</li></ol></section><small>Independent OpenDesign demonstration. Native DADS component CSS; system font fallback. No information is sent or stored.</small></main><script>
const f=document.querySelector('form'),i=document.querySelector('input'),e=document.querySelector('#reference-error'),found=document.querySelector('#found'),missing=document.querySelector('#missing');f.addEventListener('submit',ev=>{ev.preventDefault();found.hidden=missing.hidden=true;const valid=/^[0-9]{6}$/.test(i.value.trim());e.hidden=valid;i.setAttribute('aria-invalid',String(!valid));if(!valid){i.focus();return}const target=i.value.trim()==='123456'?found:missing;target.hidden=false;target.focus()});f.addEventListener('reset',()=>{found.hidden=missing.hidden=e.hidden=true;i.removeAttribute('aria-invalid');i.focus()});
</script></html>
Sources에서 완전한 예시를 다운로드하세요. README에 정확한 로컬 실행 명령이 안내되어 있습니다.
벤더 경로는 이 문서에 대한 상대 경로로 유지하세요. 아카이브에는 이 미리보기에 사용된 에셋이 모두 포함되어 있습니다.
04
Digital Agency 디자인 시스템 AI 에이전트 설정
구현 시작점
공식 샘플 저장소 작업 흐름과 검증된 토큰 가져오기 경로입니다. 이 미리보기는 로컬에 복사한 CSS을 사용하며, React나 백엔드가 필요하지 않습니다. Sources에 포함된 전체 작업 예제 ZIP에는 정확한 미리보기 종속성과 전체 문서도 들어 있습니다. 해당 디렉터리에 압축을 풀고 python3 -m http.server 8080을 실행한 다음 http://localhost:8080/japan-dads.html을 여세요. 모듈 기반 예제를 file://로 열지 마세요.
bash
# Official HTML samples are a source repository, not a published component SDK.
git clone https://github.com/digital-go-jp/design-system-example-components-html.git
cd design-system-example-components-html
npm install
npm run storybook
# For the standalone composition, copy these component styles into your app:
# src/components/input-text/input-text.css
# src/components/button/button.css
# Install the independently versioned token package:
npm install @digital-go-jp/[email protected]
# In a CSS-aware bundler entry:
# import '@digital-go-jp/design-tokens/dist/tokens.css';
# import './input-text.css';
# import './button.css';
프로젝트를 위한 프롬프트
에이전트 프롬프트
DADS HTML input-text 및 버튼 스타일과 design-tokens 2.0.1을 사용해 가상의 공공 서비스 접수 내역 조회를 구현하세요. 화면에 표시되는 레이블, 형식 안내, aria-describedby, 오류 상태를 유지하세요. Std-17N-170의 문장 리듬과 대형 주요 동작을 사용하세요. 형식 오류, 일치 항목 없음, 조회 결과 있음 상태를 각각 표시하세요. 입력한 텍스트를 보존하고 새 상태 제목으로 포커스를 옮기며, 실제 개인정보와 정부 기관의 식별 표시는 사용하지 마세요. 콘텐츠 너비 52rem과 8/24/64px 간격은 애플리케이션 차원의 선택으로 취급하세요.
05
Digital Agency 디자인 시스템 출처 및 범위
공식 샘플 CSS과 토큰을 사용해 독립적으로 구성한 교육용 예시입니다. 정부 기관의 보증이나 실시간 조회를 제공하지 않으며, 기관의 정체성을 나타내는 요소를 복사하지 않았습니다. 글꼴은 로컬에서 사용할 수 있는 시스템 산세리프 글꼴로 대체됩니다. 애플리케이션 레이아웃과 기록 데이터는 공식 DADS 사양이 아닙니다.