본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)8.1k · #12576

webiny-form-model

하는 일

이 스킬은 Webiny 플랫폼에서 양식을 만들 때 AI를 안내합니다. 양식 필드, 레이아웃, 검증을 명확하고 선언적인 방식으로 정의하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓빌더를 써서 Webiny 양식에 텍스트나 날짜 같은 필드를 정의해야 할 때.
  • ✓양식 레이아웃에 탭, 행, 구분선이 필요할 때.
  • ✓필드가 다른 필드 값에 따라 보이거나 숨겨지거나 검증되어야 하는 경우.

스킬 링크

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/form-model/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/form-model/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제목, 날짜, 상태가 있는 Webiny 양식을 만들어 주세요. 상태가 「예약」일 때만 날짜 필드가 보이게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 연결형 빌더로 필드를 정의하고, 레이아웃 빌더로 배치하며, 검증이나 규칙을 추가하는 방법을 보여 줍니다. 필드는 다른 필드의 값에 반응할 수도 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Form Model

TL;DR

The Form Model is Webiny's declarative form system. Define fields with a fluent builder API (fields.text(), fields.datetime(), etc.), arrange them with a layout builder (layout.row(), layout.tabs(), etc.), and validate with Zod schemas or imperative rules. Fields support conditional visibility, computed values, reactive context from other fields (.context()), and deeply nested object/list structures with templates (dynamic zones).

Field Types

All fields are created via the fields registry callback. Each builder method returns a chainable builder.

Text

fields.text();

Default renderer: textInput. Value: string | null.

fields.text().label("Title").placeholder("Enter title").required("Title is required")
fields.text().renderer("textarea", { rows: 4 })
fields.text().list().renderer("tags").defaultValue([])
fields.text().list().renderer("textInputs", { addItemLabel: "Add text" })
fields.text().list().renderer("textareas", { addItemLabel: "Add description" })
fields.text().renderer("codeEditor", { language: "html", height: 300 })
fields.text().options([
    { label: "Option A", value: "a" },
    { label: "Option B", value: "b" }
])  // auto-switches to "select" renderer
fields.text().options([...]).renderer("radioButtons")
fields.text().list().options([...]).renderer("checkboxes")

// Dynamic options — callback receives { field, form }, re-evaluated reactively
fields.text().options(({ form }) => {
    const type = form.field("general.type").getValue();
    return getOptionsForType(type);
})

Number

fields.number();

Default renderer: numberInput. Value: number | null. Auto-normalizes to number.

fields.number().label("Count").placeholder("0").required();
fields.number().list().renderer("numberInputs", { addItemLabel: "Add number" });
fields.number().options([
  { label: "Tier 1", value: 100 },
  { label: "Tier 2", value: 200 }
]);

Boolean

fields.boolean();

Default renderer: switch. Value: boolean | null.

fields.boolean().label("Featured").defaultValue(false);

DateTime

fields.datetime();

Default renderer: dateTimeInput. Pick a variant method to set the subtype:

Variant Value Format Example
.dateOnly() "2026-05-01" Holidays, due dates (birthdays: see the birthday picker below)
.timeOnly() "14:30:00" Opening hours
.withTimezone() "2026-05-01T14:30:00+02:00" Events tied to a locale
.withoutTimezone() "2026-05-01T14:30:00.000Z" Timestamps, logs
.monthOnly() "2026-05" Billing cycles
.weekOnly({ startsOn: 1 }) "2026-W18" Sprint planning
.yearOnly({ range: [2020, 2035] }) 2026 (number) Fiscal years
.dateRange() { from: "...", to: "..." } Vacation requests
.multipleDates() ["2026-05-01", "2026-05-03"] Blackout dates
.multipleMonths() ["2026-01", "2026-03"] Seasonal availability
.multipleYears({ range: [2020, 2035] }) [2024, 2025, 2026] Multi-year budgets

Additional chainable methods:

.presets([
    { label: "Today", value: () => new Date() },
    { label: "In a week", value: () => addDays(new Date(), 7) }
])
.displayFormat("dd/MM/yyyy")  // date-fns format tokens
.list()  // switches renderer to "dateTimeInputs"
.dateGte("2026-01-01", "message?")  // value must
자주 묻는 질문

검증은 어떻게 추가하나요?

스킬은 단순한 명령형 규칙뿐 아니라 Zod 스키마도 지원합니다.

필드끼리 의존할 수 있나요?

네. 조건부 표시, 비활성화, 다른 필드 값에 반응하는 필드를 다룹니다.

기본 렌더러는 무엇인가요?

텍스트 필드의 기본 렌더러는 텍스트 입력이며, 텍스트 영역이나 선택 상자 같은 다른 렌더러로 바꿀 수 있다고 스킬이 설명합니다.

상세 정보

작성자의 원본 설명

Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with tabs/rows/separators, add validation (Zod or imperative), use conditional visibility/disable rules, create computed fields, or work with object fields and templates (dynamic zones).

repo: webiny/webiny-js

인기도

GitHub 스타
8.1k
순위
#12576
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬