연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
인라인 입력과 외부 입력 비교
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
입력은 인라인 또는 외부로 렌더링할 수 있습니다. 값 입력의 커넥터가 블록 내부에 렌더링되는지 (인라인) 또는 외부 가장자리에 렌더링되는지 (외부)와 입력이 동일한 행에 렌더링되는지 또는 다른 행에 렌더링되는지를 제어합니다.

블록 정의는 입력이 인라인인지 여부를 제어하는 선택적 불리언을 지정할 수 있습니다.
JSON
{
// ...,
"inputsInline": true
}
자바스크립트
init: function() {
// ...
this.setInputsInline(true);
}
이 불리언이 true
(인라인 입력)로 설정된 경우:
- 값 입력용 커넥터는 블록 내부에 렌더링됩니다.
- 명령문 입력은 자체 행에 렌더링됩니다.
- 더미, 행 끝, 값 입력은 모두 동일한 행에 렌더링됩니다. 단, 문 또는 행 끝 입력 다음에 오는 입력은 새 행에 렌더링됩니다.
false
(외부 입력)로 설정된 경우:
- 값 입력용 커넥터는 블록의 외부 가장자리에 렌더링됩니다.
- 모든 입력은 자체 행에 렌더링됩니다. 단, 더미 입력 다음에 오는 행 끝 입력은 더미 입력과 동일한 행에 렌더링됩니다.
이 내용을 시각화하는 데 문제가 있다면 Blockly 개발자 도구에서 블록을 구성하고 inputs
드롭다운 (automatic
, external
, inline
)에 다른 설정을 선택하세요.
이 불리언이 정의되지 않으면 Blockly는 몇 가지 휴리스틱을 사용하여 어떤 모드가 가장 적합한지 추측합니다. Blockly가 올바른 선택을 한다고 가정하면 이 필드를 정의되지 않은 상태로 두는 것이 좋습니다. 언어별 번역에 따라 모드가 자동으로 달라질 수 있기 때문입니다. 삽입 토큰 순서에서 "set %1 to %2"
(외부 입력) 및 "put %2 in %1"
(인라인 입력)의 예를 참고하세요.
블록에 숫자와 같은 작은 입력이 있을 가능성이 있는 경우 인라인 입력을 사용합니다.
사용자는 컨텍스트 메뉴를 통해 이 옵션을 전환할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Inline vs. external inputs\n\nInputs can be rendered **inline** or **externally**. This controls whether the\nconnectors for value inputs are rendered inside the block (inline) or on the\noutside edge (external), as well as whether inputs are rendered in the same or\ndifferent rows.\n\nThe block definition can specify an optional boolean controlling whether inputs\nare inline or not. \n\n### JSON\n\n {\n // ...,\n \"inputsInline\": true\n }\n\n### JavaScript\n\n init: function() {\n // ...\n this.setInputsInline(true);\n }\n\nWhen this boolean is set to `true` (inline inputs):\n\n- The connectors for value inputs are rendered inside the block.\n- Statement inputs are rendered on their own row.\n- Dummy, end-of-row, and value inputs are all rendered in the same row, except that any input following a statement or end-of-row input is rendered on a new row.\n\nWhen it is set to `false` (external inputs):\n\n- The connectors for value inputs are rendered on the outside edge of the block.\n- All inputs are rendered in their own row, except that an end-of-row input that follows a dummy input is rendered in the same row as the dummy input.\n\nIf you're having trouble visualizing this, construct blocks in the\n[Blockly Developer Tools](https://google.github.io/blockly-samples/examples/developer-tools/index.html) and choose different settings for the\n`inputs` dropdown (`automatic`, `external`, `inline`).\n\nIf this boolean is not defined then Blockly will use some heuristics to guess\nwhich mode is\nbest. Assuming Blockly makes the right choice, leaving this field undefined\nis preferable since different language translations can automatically have\ndifferent modes. See the example of `\"set %1 to %2\"` (external inputs) and\n`\"put %2 in %1\"` (inline inputs) in [Interpolation token\norder](/blockly/guides/create-custom-blocks/define/structure-json#interpolation_token_order).\n\nUse inline inputs when a block is likely to have small inputs such as numbers.\nThe user can toggle this option through the context menu."]]