한글 조합과 다국어 입력 지키기
Text Input And Internationalization
IME 조합, 글자 수, 커서, 양방향 텍스트를 편집 의도에 맞게 다룹니다.
이 자료로 구현하기
원문 주소와 버전이 포함된 요청문입니다. 복사한 뒤 만들 화면과 요구사항을 채워 에이전트에게 전달하세요.
FROM PRINCIPLE TO PRACTICE
이 원리로 만든 예제 18
예제를 열어 동작을 살펴보고, 코드와 함께 이 문서의 원리를 확인해 보세요.
Text Animate
- 등장 단위가 문장을 바꾸지 않게
TextAnimate는 단어에서는 공백을 보존하는 정규식, character에서는 split("")을 씁니다. duration/segments.length는 지연 간격이며 각 변형의 자체 0.3초 등과 합쳐집니다. 데모는 blurInUp·character·once이며 기본 accessible 경로가 원문과 숨긴 시각 조각을 제공합니다.
- 등장 단위가 문장을 바꾸지 않게
Glyph Matrix
- 장식 글리프의 분할 단위
GlyphMatrix는 glyphs의 임의 문자열 인덱스를 각 canvas 셀에 저장하고 90ms 간격으로 일부 셀을 바꿉니다. 기본 문자는 단순 기호지만 결합 문자나 이모지로 바꾸면 인덱싱의 단위가 드러납니다. canvas는 aria-hidden 장식입니다.
- 장식 글리프의 분할 단위
Hyper Text
- 섞인 글자와 원문 보존
HyperText는 children.split("") 배열을 임의 대문자로 바꾸다 인덱스 순서로 복구합니다. 데모는 Hover Me!이며 마운트와 hover에 반응합니다. displayText 길이는 초기 children에서 생성되므로 길이가 달라진 새 입력도 확인해야 합니다.
- 섞인 글자와 원문 보존
연결된 예제 15개 더 보기
Kinetic Text
- 글자별 hover와 텍스트 단위
KineticText는 split("")으로 나눈 각 span과 양옆 이웃의 굵기·패딩을 hover로 바꿉니다. 시각 span은 aria-hidden이고 sr-only에 원문을 둡니다. flex-wrap이 글자 단위 줄바꿈을 만들므로 긴 문구와 복합 문자를 점검해야 합니다.
- 글자별 hover와 텍스트 단위
Text 3D Flip
- 뒤집는 글자의 경계와 복제면
Text3DFlip은 Intl.Segmenter가 있으면 grapheme으로, 없으면 Array.from으로 글자를 나눕니다. 각 글자 두 면과 sr-only 원문을 함께 렌더링하지만 시각 면에 aria-hidden은 없습니다. 대표 데모는 위로 뒤집히는 영문 문장입니다.
- 뒤집는 글자의 경계와 복제면
Typing Animation
- 타이핑 단계와 실제 문자 단위
TypingAnimation은 typing→pause→deleting 단계를 타이머로 이동하며 입력 문자열이 바뀌면 인덱스를 초기화합니다. graphemes라는 변수는 Array.from 결과라 코드 포인트 단위입니다. 대표 데모의 손 이모지 한 개가 모든 복합 문자의 보존을 증명하지는 않습니다.
- 타이핑 단계와 실제 문자 단위
Hover Animations for Terminal-like Typography
- 무작위 글자 교체 뒤 원문을 복원
TextAnimator는 분할 글자의 originalChars를 저장하고 animate 전에 각 tween을 종료해 원래 HTML을 복구합니다. 짧은 반복 동안 기호를 넣었다가 initialHTML로 돌아갑니다.
- 무작위 글자 교체 뒤 원문을 복원
How to Create Responsive and SEO-friendly WebGL Text
- DOM 문구와 WebGL 글자의 동기 범위
WebGLText는 element.innerText로 메시 문구를 만들고 계산 스타일·bounds에서 글꼴과 위치를 구합니다. resize는 스타일과 bounds를 다시 읽는 별도 경로입니다.
- DOM 문구와 WebGL 글자의 동기 범위
Letter Shuffle Animation for a Menu
- 첫 글자 슬롯과 세로 제목의 대응
MenuItem.layout은 원문 글자와 무작위 대문자 뒤에 displayVerticalTitle의 itemPosition 글자를 넣어 슬롯을 구성합니다. 항목 수와 세로 제목 문자열 인덱스가 연결됩니다.
- 첫 글자 슬롯과 세로 제목의 대응
On-Scroll Sliced Text Animation
- 잘라 보여 줄 원문 복제와 하나의 읽기 경로
Item.layout은 data-text 전체를 totalCells만큼 복제합니다. setCSSValues는 첫 복제본의 폭을 --text-width로 공유해 각 조각의 위치를 맞춥니다.
- 잘라 보여 줄 원문 복제와 하나의 읽기 경로
On-Scroll Text Repetition Animation
- 반복 글자의 이동만큼 읽기 공간 확보
RepeatTextScrollFx는 원문 HTML을 여러 span으로 복제하고 텍스트 높이·반복 수·tyIncrement에서 marginTop과 paddingBottom을 계산합니다.
- 반복 글자의 이동만큼 읽기 공간 확보
On-Scroll Typography Animations
- 글자 단위 진입과 원문 보존
첫 타이포그래피 효과는 .char별 무작위 rotationZ·축소·opacity를 스크롤로 복구합니다. 글자 분할과 순차 노출은 문장 읽기와 다른 표현 책임입니다.
- 글자 단위 진입과 원문 보존
Players Club: A Free Astro Template for Showcasing Music Artists
- 검색 문자열을 필터와 표시 양쪽에 쓰기
handleSearchInput은 입력을 filterGrid로 넘기고 검색 버튼의 searchContent.innerHTML에도 직접 넣습니다. 필터는 data-name·data-stagename을 소문자로 비교합니다.
- 검색 문자열을 필터와 표시 양쪽에 쓰기
Repetitive Typography Animation
- 짝수·홀수 글자를 다른 행으로 옮기기
introTimeline은 중앙 제목의 짝수·홀수 글자를 위·아래 행의 측정된 y 차이만큼 나눠 옮긴 뒤 각 행 복제본의 opacity로 소유권을 바꿉니다.
- 짝수·홀수 글자를 다른 행으로 옮기기
Shuffling Typography Animation
- 이전 셀의 글자를 전달하는 셔플
첫 셔플은 각 셀의 이전 값을 cache로 저장하고 다음 셀이 그 값을 가져오게 합니다. 마지막 반복에서는 original로 복귀하며 공백은 반복 횟수 계산에서 다르게 취급합니다.
- 이전 셀의 글자를 전달하는 셔플
Tag Input Form · Ved UI
- 태그 추가와 조합 확정의 경계
TagInputForm은 Enter를 받으면 기본 동작을 막고 입력을 trim한 뒤 비어 있지 않으면 태그에 추가하고 입력을 비웁니다. 조합 상태를 확인하는 분기는 없습니다. 공백 정리는 추가 시점에만 일어나며, 한국어 조합 확정 Enter가 같은 경로를 타는지는 실제 입력기로 확인해야 합니다.
- 태그 추가와 조합 확정의 경계
Input Form · Ved UI
- 입력 길이와 사용자가 읽는 글자
정확한 원 데모는 z.string().min(2)로 text를 검사합니다. 공백 제거·최대 길이·문자열 분할 정책은 없습니다. 두 글자라는 오류 문구와 사용자가 인식하는 글자의 수가 같은지 제품에서 검토해야 합니다.
- 입력 길이와 사용자가 읽는 글자
비밀번호 요구사항 알림 · Origin UI
- 8 characters 문구는 검증 단위를 정의하지 않는다
comp-278은 Minimum 8 characters와 특수문자 요구사항을 고정 목록으로 표시합니다. 비밀번호 입력, 카운터, 검증 함수가 없으므로 코드 단위·코드 포인트·글자 묶음 중 무엇을 세는지 결정하지 않습니다. 이 두 조건을 보편적인 비밀번호 정책으로 해석하지 않습니다.
- 8 characters 문구는 검증 단위를 정의하지 않는다
Primary role: multilingual text interaction and verification guide.
Repository Boundary
This guide owns text editing and product-data decisions. Layout owns spatial constraints; a translation or input method does not authorize copying product typography into reusable Layout CSS. Browser text measurement is not proof that an editor preserves user intent.
Reusable Method
Declare three contracts before implementing formatting: what the user can edit, what the application stores, and what it displays. Name the unit of any limit or selection offset. Then inventory composition, paste, autofill, correction, undo, direction, and locale changes. An event sequence from one Latin keyboard is a narrow sample.
Source Findings
| Source | Bounded finding | Design consequence |
|---|---|---|
| UI Events | Composition has its own event lifecycle; isComposing identifies events within a composition session. |
Do not treat every intermediate edit as a committed command. |
| Input Events Level 2 | Input types describe edit intentions. The draft distinguishes cancelability during IME composition. | Inspect actual events; a universal keydown filter cannot govern every edit path. |
| Unicode Text Segmentation, UAX #29 | Grapheme clusters approximate user-perceived characters; boundaries are distinct from code points and words. | State whether a limit counts bytes, code units, code points, or grapheme clusters. |
| ECMA-402 Segmenter | Intl.Segmenter exposes locale-sensitive segmentation at named granularities. |
Name locale and granularity when using segmentation in a UI. |
| W3C bidirectional markup guidance | HTML direction metadata and isolation help mixed-direction content retain its intended ordering. | Treat document direction and inserted user text separately. |
| Accessible Authentication explanation | WCAG 2.2's AA criterion limits required cognitive-function tests, with specified alternatives and assistance. | Do not casually remove paste or password-manager assistance from an authentication flow. |
Sources were inspected 2026-09-21. UI/Input Events and ECMA-402 publication states must be read as labeled; a draft API description is not a claim that every target implements it identically. UAX #29 has versioned rules, so record the Unicode/runtime boundary for a reproducible segmentation claim.
Worked Scenario: Korean Search With Suggestions
The user enters a Korean name, navigates candidates, commits composition, and then submits a search. Product state distinguishes the editable text, composition status, selected suggestion identity, and submitted query.
Local policy: preserve the browser's in-progress composition. Do not move focus, replace the input node, run destructive formatting, or submit the form merely because a command key arrived during composition. Commit-driven search is a product choice; live preview during composition needs a separate decision and stale-result policy.
| Event or condition | Proposed responsibility | Failure it prevents |
|---|---|---|
| Composition starts | Keep the editing node and draft stable. | Rerendering discards the input method's active composition. |
| Intermediate input | Retain the edit without treating a candidate as the submitted query. | A provisional syllable becomes an unintended request or selection. |
| Candidate confirmation | Let the input method complete its edit before interpreting a separate application command. | Enter both confirms composition and submits unexpectedly. |
| Suggestions return out of order | Match them to current query intent. | An old response replaces suggestions for the current text. |
| User presses Escape | Resolve input-method, popup, and outer-surface ownership deliberately. | One key cancels composition, closes the popup, and closes the editor. |
The exact native event order is a target observation, not prescribed here. Test the real IME in each supported browser/OS; synthetic composition events do not recreate the operating system's input method. Use latest request wins for replaceable reads.
Text Units And Limits
For a visible “characters remaining” count, decide what users should perceive as one unit, then compare that policy with the backend limit. A grapheme count cannot guarantee that a byte-limited service accepts the value. Show the relevant limit rather than truncating silently after submission.
Use a corpus containing Hangul composition, a base letter plus combining mark, emoji sequences, an empty value, pasted line breaks, and a long unbroken identifier. Verify counters, truncation, deletion, selection restoration, and round trips. A correct count with corrupted cursor placement is still an editing failure.
Formatting belongs at a declared boundary. If a field needs grouping separators, preserve an editable representation and caret policy. A localized display string is not automatically a canonical stored number or date. Decide how incomplete input, ambiguous separators, and locale changes are resolved before adding automatic reformatting.
Direction And Mixed Content
Set the document's language and base direction intentionally. Isolate inserted names, identifiers, and other independently directed text where needed; test punctuation and adjacent controls as well as the text itself. CSS alignment alone cannot establish the semantic direction of user data.
Product tests should include an RTL name beside an LTR identifier, paired punctuation, numerals, and a trailing action. Preserve logical reading order while the Layout owner chooses logical spacing and containment.
Opinionated Guidance
Preserve raw editing intent until a clear commit boundary. Prefer a reversible validation message over eager rewriting that the user cannot undo. Store stable identity separately from the localized label of a suggestion.
Platform-Specific Guidance
Keyboard layouts, IMEs, dictation, autofill, and virtual keyboards can take different event paths. Record OS, browser, input method, locale, and assistive technology instead of a generic “mobile tested.” For typography and scaling, use Preferences And Accessibility.
Unsupported Absolutes
One code point is not necessarily one perceived character. A keypress is not the only way to edit text. A segmentation API is not a locale-aware parser. Programmatically dispatched events are not evidence that a native IME works.
Verification Contract
The proposed cases cover real composition, candidate selection, paste, undo/redo, replacement selection, autofill, server rejection, mixed direction, and locale change with an unfinished draft. Bind observed input and submitted data to the same scenario; independently inspect the accepted backend value where that claim matters.
Record both intended and observed event/selection outcomes, without storing private user input in diagnostic artifacts. The examples above are test data proposals; no IME, browser, or backend execution is claimed. Re-review after editor, formatter, runtime, or locale-policy changes.
Source, License, And Attribution
Locally authored synthesis of the linked primary sources, inspected 2026-09-21. No upstream examples are reproduced. consumer_reference: not_applicable because no consumer editor record is selected.
IA Navigation
Parent: Design Engineering. Next: Loading And Feedback.



