QML
← 전체 컴포넌트

Input

이름이나 검색어처럼 한 줄의 텍스트를 입력하는 필드입니다. 라벨, 안내 문구와 검증 오류를 함께 표시합니다.

import Syidax.Core.Input

지원 QML 타입

타입정의 / 역할
검증·도움말·선택적 지우기 버튼을 갖춘 한 줄 텍스트 필드입니다.

예제로 보기

미리보기는 Qt 실행 화면의 이미지입니다. 아래 버튼으로 결과를 전환하세요.

01 기본 구성

SyInput은 한 줄 텍스트 필드입니다.

Qt 실행 화면 · 이미지
기본 구성 · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    property QtObject settings: QtObject {
        id: storyArgs
        property string label: "이름"
        property string placeholder: "이름을 입력하세요"
        property string value: ""
        property string variant: "text"
        property string type: "text"
        property string size: "medium"
        property string status: "default"
        property bool required: false
        property bool disabled: false
        property bool readonly: false
        property bool clearable: false
        property bool borderless: false
        property string message: ""
    }

    

    SyInput {
        label: storyArgs.label
        placeholder: storyArgs.placeholder
        value: storyArgs.value
        variant: storyArgs.variant
        type: storyArgs.type
        size: storyArgs.size
        status: storyArgs.status
        required: storyArgs.required
        disabled: storyArgs.disabled
        readonly: storyArgs.readonly
        clearable: storyArgs.clearable
        borderless: storyArgs.borderless
        message: storyArgs.message
        onValueChanged: if (storyArgs.value !== value) storyArgs.value = value
    }

}

02 variant

variant가 세 종류의 필드 중 하나를 고릅니다.

Qt 실행 화면 · 이미지
variant · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    Column {
        spacing: 12
        SyInput { placeholder: "이름을 입력하세요" }
        SyInput { variant: "password"; value: "hunter2" }
        SyInput { variant: "search" }
    }
}

03 size

size가 상자 높이와 글자 크기를 정합니다.

Qt 실행 화면 · 이미지
size · 기본
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    property QtObject settings: QtObject {
        id: storyArgs
        property string size: "medium"
    }

    

    SyInput { label: "이름"; placeholder: "이름을 입력하세요"; size: storyArgs.size }
}

04 status

status는 검증과 무관하게 상자의 색을 정합니다.

Qt 실행 화면 · 이미지
status · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    Column {
        spacing: 12
        SyInput { value: "default" }
        SyInput { value: "warning"; status: "warning" }
        SyInput { value: "error"; status: "error" }
        SyInput { value: "success"; status: "success" }
    }
}

05 disabled · readonly · borderless

세 속성이 사용자가 할 수 있는 일을 바꿉니다.

Qt 실행 화면 · 이미지
disabled · readonly · borderless · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    // Focused Gallery routes: keep only the selected API and its prerequisites.
    id: featureStory

    Column {
        spacing: 12
        SyInput { id: featureTarget0; visible: true; value: "비활성"; disabled: true }
        SyInput { id: featureTarget1; visible: true; value: "읽기 전용"; readonly: true }
        SyInput { id: featureTarget2; visible: true; placeholder: "테두리 없음"; borderless: true }
    }
}

06 clearable

clearable: true는 필드가 포커스를 갖고 값이 비어 있지 않은 동안 상자 끝에 ×를 보입니다(disabled·readonly에서는 보이지 않음).

Qt 실행 화면 · 이미지
clearable · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    component EventLog: Rectangle {
        id: logBox
        property var lines: []
        implicitWidth: 440
        implicitHeight: Math.max(56, logText.implicitHeight + 24)
        radius: 4; color: Theme.semantic.backgroundBold
        function log(value) { lines = lines.slice(-3).concat([String(value)]) }
        Text {
            id: logText; x: 12; y: 12; width: parent.width - 24
            text: logBox.lines.length ? logBox.lines.join("\n") : "컨트롤을 조작하면 이벤트 결과가 표시됩니다."
            wrapMode: Text.Wrap; color: Theme.semantic.textDefault
            font.family: Theme.monoFontFamily; font.pixelSize: 12
        }
    }

    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    Column {
        spacing: 12
        SyInput { clearable: true; value: "지워 보세요"; onClear: output.log("clear") }
        EventLog { id: output }
    }
}

07 prefix · suffix

prefix와 suffix는 어떤 아이템이든 받습니다 — 아이콘, 단위, 짧은 텍스트, 작은 버튼 — 그리고 상자 안에 배치합니다.

Qt 실행 화면 · 이미지
prefix · suffix · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    // Focused Gallery routes: keep only the selected API and its prerequisites.
    id: featureStory

    Column {
        spacing: 12
        SyInput { id: featureTarget0; visible: true;
            placeholder: "you@example.com"
            prefix: SyIcon { source: Icons.inputSearch }
        }
        SyInput { id: featureTarget1; visible: true;
            value: "42"
            suffix: Text { text: "USD"; color: Theme.semantic.textSubtle; font.family: Theme.fontFamily; font.pixelSize: 14 }
        }
    }
}

08 required · min · max · type · error

네 속성이 validStatus를 정합니다.

Qt 실행 화면 · 이미지
required · min · max · type · error · 기본
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    // Focused Gallery routes: keep only the selected API and its prerequisites.
    id: featureStory

    Column {
        spacing: 12
        SyInput { visible: true; id: nameField; label: "이름"; required: true; placeholder: "이름을 입력하세요" }
        SyInput { visible: true; id: nickField; label: "닉네임"; min: 3; max: 8; message: "3~8자" }
        SyInput { visible: true; id: emailField; label: "이메일"; type: "email"; error: "이메일 주소 형식이 아닙니다" }
        Row {
            spacing: 8
            SyButton { id: exampleControl1;  visible: true; text: "nameField.reportValidity()"; variant: "secondary"; size: "small"; onClicked: nameField.reportValidity() }
            SyButton { id: exampleControl2;  visible: true; text: "nickField.reportValidity()"; variant: "secondary"; size: "small"; onClicked: nickField.reportValidity() }
            SyButton { id: exampleControl3;  visible: true; text: "emailField.reportValidity()"; variant: "secondary"; size: "small"; onClicked: emailField.reportValidity() }
        }
    }
}

09 changed · focused · blured · clear

필드에는 시그널이 넷 있습니다.

Qt 실행 화면 · 이미지
changed · focused · blured · clear · 기본
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    component EventLog: Rectangle {
        id: logBox
        property var lines: []
        implicitWidth: 440
        implicitHeight: Math.max(56, logText.implicitHeight + 24)
        radius: 4; color: Theme.semantic.backgroundBold
        function log(value) { lines = lines.slice(-3).concat([String(value)]) }
        Text {
            id: logText; x: 12; y: 12; width: parent.width - 24
            text: logBox.lines.length ? logBox.lines.join("\n") : "컨트롤을 조작하면 이벤트 결과가 표시됩니다."
            wrapMode: Text.Wrap; color: Theme.semantic.textDefault
            font.family: Theme.monoFontFamily; font.pixelSize: 12
        }
    }

    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    // Focused Gallery routes: keep only the selected API and its prerequisites.
    id: featureStory

    

    Column {
        spacing: 12
        SyInput {
            label: "이메일"; type: "email"; required: true; clearable: true
            onChanged: (detail) => { if (true) { output.log(("changed: %1 (valid: %2)").arg(detail.value).arg(detail.isValid)) } }
            onFocused: (detail) => { if (true) { output.log("focused") } }
            onBlured: (detail) => { if (true) { output.log(("blured: status %1").arg(detail.status)) } }
            onClear: { if (true) { output.log("clear") } }
        }
        EventLog { id: output }
    }
}

10 setFocus · checkValidity · reportValidity · …

필드의 함수들입니다.

Qt 실행 화면 · 이미지
setFocus · checkValidity · reportValidity · … · 기본
QML 코드
import QtQuick
import Syidax.Core

Item {
    component EventLog: Rectangle {
        id: logBox
        property var lines: []
        implicitWidth: 440
        implicitHeight: Math.max(56, logText.implicitHeight + 24)
        radius: 4; color: Theme.semantic.backgroundBold
        function log(value) { lines = lines.slice(-3).concat([String(value)]) }
        Text {
            id: logText; x: 12; y: 12; width: parent.width - 24
            text: logBox.lines.length ? logBox.lines.join("\n") : "컨트롤을 조작하면 이벤트 결과가 표시됩니다."
            wrapMode: Text.Wrap; color: Theme.semantic.textDefault
            font.family: Theme.monoFontFamily; font.pixelSize: 12
        }
    }

    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height
    // Focused Gallery routes: keep only the selected API and its prerequisites.
    id: featureStory

    Column {
        spacing: 12
        SyInput { id: nameField; label: "이름"; required: true }
        Flow {
            width: 560
            spacing: 8
            SyButton { id: exampleControl1;  visible: true; text: "nameField.setFocus()"; variant: "secondary"; size: "small"; onClicked: nameField.setFocus() }
            SyButton { id: exampleControl2;  visible: true; text: "nameField.setBlur()"; variant: "secondary"; size: "small"; onClicked: nameField.setBlur() }
            SyButton { id: exampleControl3;  visible: true; text: "nameField.checkValidity()"; variant: "secondary"; size: "small"; onClicked: output.log("checkValidity() → " + nameField.checkValidity()) }
            SyButton { visible: true; text: "nameField.reportValidity()"; variant: "secondary"; size: "small"; onClicked: output.log("reportValidity() → " + nameField.reportValidity()) }
            SyButton { visible: true; text: "nameField.setCustomError()"; variant: "secondary"; size: "small"; onClicked: nameField.setCustomError() }
            SyButton { visible: true; text: "nameField.clearCustomError()"; variant: "secondary"; size: "small"; onClicked: nameField.clearCustomError() }
            SyButton { visible: true; text: "nameField.getStatus()"; variant: "secondary"; size: "small"; onClicked: output.log("getStatus() → " + JSON.stringify(nameField.getStatus())) }
        }
        Text {
            text: "nameField.hasFocus === " + nameField.hasFocus + "   nameField.valid === " + nameField.valid
            font.family: Theme.monoFontFamily
            font.pixelSize: 12
            color: Theme.semantic.textSubtle
        }
        EventLog { id: output }
    }
}

11 검색과 지우기

variant · clearable · value 설정을 적용한 검색과 지우기 예제입니다.

Qt 실행 화면 · 이미지
검색과 지우기 · 실행 결과
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    property QtObject settings: QtObject {
        id: storyArgs
        property string label: "이름"
        property string placeholder: "이름을 입력하세요"
        property string value: "Syidax"
        property string variant: "search"
        property string type: "text"
        property string size: "medium"
        property string status: "default"
        property bool required: false
        property bool disabled: false
        property bool readonly: false
        property bool clearable: true
        property bool borderless: false
        property string message: ""
    }

    

    SyInput {
        label: storyArgs.label
        placeholder: storyArgs.placeholder
        value: storyArgs.value
        variant: storyArgs.variant
        type: storyArgs.type
        size: storyArgs.size
        status: storyArgs.status
        required: storyArgs.required
        disabled: storyArgs.disabled
        readonly: storyArgs.readonly
        clearable: storyArgs.clearable
        borderless: storyArgs.borderless
        message: storyArgs.message
        onValueChanged: if (storyArgs.value !== value) storyArgs.value = value
    }

}

12 비밀번호 입력

variant · value 설정을 적용한 비밀번호 입력 예제입니다.

Qt 실행 화면 · 이미지
비밀번호 입력 · 실행 결과
기본 실행 화면
QML 코드
import QtQuick
import Syidax.Core

Item {
    implicitWidth: Math.max(360, childrenRect.width)
    implicitHeight: childrenRect.height

    property QtObject settings: QtObject {
        id: storyArgs
        property string label: "이름"
        property string placeholder: "이름을 입력하세요"
        property string value: "example-password"
        property string variant: "password"
        property string type: "text"
        property string size: "medium"
        property string status: "default"
        property bool required: false
        property bool disabled: false
        property bool readonly: false
        property bool clearable: false
        property bool borderless: false
        property string message: ""
    }

    

    SyInput {
        label: storyArgs.label
        placeholder: storyArgs.placeholder
        value: storyArgs.value
        variant: storyArgs.variant
        type: storyArgs.type
        size: storyArgs.size
        status: storyArgs.status
        required: storyArgs.required
        disabled: storyArgs.disabled
        readonly: storyArgs.readonly
        clearable: storyArgs.clearable
        borderless: storyArgs.borderless
        message: storyArgs.message
        onValueChanged: if (storyArgs.value !== value) storyArgs.value = value
    }

}

13 필수 입력과 초기화

검증 전·오류 표시·초기화 결과를 비교합니다.

Qt 실행 화면 · 이미지
필수 입력과 초기화 · 입력 전
QML 코드
import QtQuick
import Syidax.Core

Column {
    width: 440; spacing: 12
    SyInput {
        id: field; width: parent.width; name: "selection"; required: true
        label: "필수 입력"; placeholder: "name@example.com"; type: "email"
        
        error: "계속하려면 이 항목을 입력하세요."
    }
    Row {
        spacing: 8
        SyButton { id: check; text: "검증"; onClicked: field.reportValidity() }
        SyButton { id: reset; text: "초기화"; onClicked: field.reset() }
    }
    Text { text: "상태: " + (field.invalid ? "오류" : "입력 준비"); color: Theme.semantic.textDefault }
}

14 사용자 지정 오류

업무 규칙에 맞는 오류를 표시하고 초기화합니다.

Qt 실행 화면 · 이미지
사용자 지정 오류 · 입력 전
QML 코드
import QtQuick
import Syidax.Core

Column {
    width: 440; spacing: 12
    SyInput {
        id: field; width: parent.width; name: "selection"; required: true
        label: "필수 입력"; placeholder: "name@example.com"; type: "email"
        value: "hello@example.com"
        error: "현재 사용할 수 없는 선택입니다. 다른 값을 선택하세요."
    }
    Row {
        spacing: 8
        SyButton { id: check; text: "오류 표시"; onClicked: field.setCustomError() }
        SyButton { id: reset; text: "초기화"; onClicked: field.reset() }
    }
    Text { text: "상태: " + (field.invalid ? "오류" : "입력 준비"); color: Theme.semantic.textDefault }
}

API 93

항목을 가리키거나 선택하면 QML 예제와 복사 버튼이 나타납니다.

속성

항목동작 / 조건
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.
공통 필드 속성(name, label, required, disabled, size, message, error, touched, submitted, customError, validStatus, valid, invalid, preferredWidth, showTitle, ready)은 Form 페이지에 설명되어 있습니다.

속성

속성타입기본값설명
string""텍스트. 키를 누를 때마다, 그리고 대입할 때 바뀝니다. 문자열이 아닌 값은 변환됩니다.
string""값이 비어 있는 동안 표시. 플레이스홀더가 빈 search variant는 "Search"를 보입니다.
string""상자 위의 제목. required이면 *가 붙습니다.
string""상자 아래 도움말 줄. 오류가 보이는 동안 숨김.
string""무효인 동안 기본 문구 대신 쓸 직접 작성한 오류 문구.
string""소속 SyForm의 values()에서의 키.
string"text"text · password(글자 숨김, 눈 토글) · search(글리프, "Search" 플레이스홀더).
string"text"text · email · url · tel · number · password · search. text가 아니면 숨김·키보드 힌트·형식 검사에서 variant를 덮어씁니다.
string"medium"small 24 · medium 32 · large 40 px 높이, 글자 12 · 14 · 16 px.
string"default"default · warning · error · success — 검증과 무관한 색조. 무효 색조 뒤로 숨겨집니다.
boolfalse빈 값 → valueMissing. * 표시를 더합니다.
boolfalse반응 없음, 항상 유효, 제출되지 않음.
boolfalse선택은 되지만 편집은 안 됨. 항상 유효하며 제출됩니다.
boolfalse값이 있고 포커스 중일 때 ×를 보입니다. 누르면 값을 비우고 clear()를 발생시킵니다.
boolfalse상자가 포커스되거나 무효가 되기 전까지 테두리 없음.
int-1비어 있지 않은 값의 최소 길이(tooShort). -1 = 없음.
int-1최대 길이. 타이핑이 거기서 멈추고, 코드로 넣은 더 긴 값은 tooLong. -1 = 없음.
boolfalse필드가 만들어지자마자 상자에 포커스.
Item 목록—상자 안, 텍스트 앞의 아이템.
Item 목록—텍스트 뒤, 내장 아이콘 다음의 아이템.
boolfalse비밀번호 필드가 글자를 보이는지 여부. 눈 아이콘이 뒤집습니다.
bool(읽기 전용)—텍스트 상자가 활성 포커스를 가짐.
bool(읽기 전용)—포인터가 상자 위에 있음(disabled에서는 false).
string(읽기 전용)—문자열로서의 value.
읽기 전용—실제로 적용되는 종류(type이 "text"가 아니면 그것, 아니면 variant)와 그것이 password인지 여부.
읽기 전용—실제로 적용되는 종류(type이 "text"가 아니면 그것, 아니면 variant)와 그것이 password인지 여부.
읽기 전용—× / 테두리가 보이는지, 그리고 현재 색조(enabled · hover · focus · warning · error · success · invalid · readonly · disabled).
읽기 전용—× / 테두리가 보이는지, 그리고 현재 색조(enabled · hover · focus · warning · error · success · invalid · readonly · disabled).
읽기 전용—× / 테두리가 보이는지, 그리고 현재 색조(enabled · hover · focus · warning · error · success · invalid · readonly · disabled).

메서드

메서드설명
텍스트 상자에 포커스(focused 발생, 링 표시).
포커스 해제(blured 발생, touched 설정).
상태가 ""이면 true. 화면 변화 없음.
같은 결과를 돌려주고 필드를 보고됨으로 표시해 이제부터 오류 줄이 보이게 합니다.
상태 "custom"과 touched — 오류(error 또는 "Invalid by custom")가 즉시 보입니다. 인자 없음.
custom 상태 해제. 일반 검사가 다시 적용됩니다.
"" · valueMissing · tooShort · tooLong · typeMismatch · custom.
필드가 만들어질 때의 값으로. touched·보고·custom 플래그를 지웁니다.

시그널

시그널인자발생 시점
detail: { value: string, isValid: bool, status: string }로딩 뒤 value가 바뀜 — 키 입력마다, ×, 코드의 대입. 초기값에는 발생하지 않음.
같음상자가 활성 포커스를 얻음.
같음상자가 포커스를 잃음. 먼저 touched가 설정되므로 오류 줄이 함께 나타날 수 있음.
—×를 누른 뒤. value는 이미 ""이고 그에 대한 changed는 발생한 뒤. 코드가 값을 비울 때는 발생하지 않음.

동작

항목동작 / 조건
텍스트. 키를 누를 때마다, 그리고 대입할 때 바뀝니다. 문자열이 아닌 값은 변환됩니다.
로딩 뒤 value가 바뀜 — 키 입력마다, ×, 코드의 대입. 초기값에는 발생하지 않음.
초기값은 아무것도 발생시키지 않습니다(ready는 필드 로딩이 끝날 때까지 false).
값이 비어 있는 동안 표시. 플레이스홀더가 빈 search variant는 "Search"를 보입니다.
text · password(글자 숨김, 눈 토글) · search(글리프, "Search" 플레이스홀더).
문자열로서의 value.
text · email · url · tel · number · password · search. text가 아니면 숨김·키보드 힌트·형식 검사에서 variant를 덮어씁니다.
상태 "custom"과 touched — 오류(error 또는 "Invalid by custom")가 즉시 보입니다. 인자 없음.
빈 값 → valueMissing. * 표시를 더합니다.
비어 있지 않은 값의 최소 길이(tooShort). -1 = 없음.
최대 길이. 타이핑이 거기서 멈추고, 코드로 넣은 더 긴 값은 tooLong. -1 = 없음.
valid는 상태를 따르고, invalid는 오류를 보여도 되는 때 — 블러 뒤(touched) 또는 reportValidity() 뒤(submitted) — 에만 true입니다.
valid는 상태를 따르고, invalid는 오류를 보여도 되는 때 — 블러 뒤(touched) 또는 reportValidity() 뒤(submitted) — 에만 true입니다. disabled > readonly > invalid > status(warning · error · success) > focus > hover > enabled — 처음 해당하는 것이 테두리·배경·글자·아이콘 색을 정합니다.
valid는 상태를 따르고, invalid는 오류를 보여도 되는 때 — 블러 뒤(touched) 또는 reportValidity() 뒤(submitted) — 에만 true입니다. 상자를 떠나면 blured가 발생하고 touched가 설정됩니다. ×(clearable)는 값이 있고 포커스 중일 때만 보이며, 누르면 값을 비우고 changed 다음 clear()를 발생시킨 뒤 상자에 포커스를 되돌립니다.
같은 결과를 돌려주고 필드를 보고됨으로 표시해 이제부터 오류 줄이 보이게 합니다.
valid는 상태를 따르고, invalid는 오류를 보여도 되는 때 — 블러 뒤(touched) 또는 reportValidity() 뒤(submitted) — 에만 true입니다.
무효인 동안 기본 문구 대신 쓸 직접 작성한 오류 문구.
상자 아래 도움말 줄. 오류가 보이는 동안 숨김.
반응 없음, 항상 유효, 제출되지 않음.
선택은 되지만 편집은 안 됨. 항상 유효하며 제출됩니다.
default · warning · error · success — 검증과 무관한 색조. 무효 색조 뒤로 숨겨집니다.
disabled > readonly > invalid > status(warning · error · success) > focus > hover > enabled — 처음 해당하는 것이 테두리·배경·글자·아이콘 색을 정합니다.
disabled > readonly > invalid > status(warning · error · success) > focus > hover > enabled — 처음 해당하는 것이 테두리·배경·글자·아이콘 색을 정합니다.
상자가 포커스되거나 무효가 되기 전까지 테두리 없음.
상자가 활성 포커스를 얻음.
상자가 포커스를 잃음. 먼저 touched가 설정되므로 오류 줄이 함께 나타날 수 있음.
값이 있고 포커스 중일 때 ×를 보입니다. 누르면 값을 비우고 clear()를 발생시킵니다.
×를 누른 뒤. value는 이미 ""이고 그에 대한 changed는 발생한 뒤. 코드가 값을 비울 때는 발생하지 않음.
비밀번호 필드가 글자를 보이는지 여부. 눈 아이콘이 뒤집습니다.
disabled는 포커스와 타이핑을 막고 SyForm.values()에서 필드를 건너뜁니다.
필드는 width를 정하지 않으면 240 px 너비이고, 상자·제목·메시지 줄이 그 너비를 따릅니다.
small 24 · medium 32 · large 40 px 높이, 글자 12 · 14 · 16 px.
상자 안, 텍스트 앞의 아이템.
텍스트 뒤, 내장 아이콘 다음의 아이템.
색은 Theme.input에서 오고 Theme.scheme을 따릅니다. 아이콘 색 전환은 Theme.reducedMotion에서 생략됩니다.

키보드

항목동작 / 조건
키보드: Tab과 Shift+Tab으로 필드에 진입하고 이동합니다. 숨김·비활성 필드는 건너뜁니다. 열린 선택기는 Escape로 닫을 수 있습니다. Textarea의 Tab은 들여쓰기 대신 포커스를 이동하며 Modal 안에서는 포커스 경계를 유지합니다.