webiny-website-builder
यह क्या करती है
समझाती है कि Next.js से बनी Website Builder साइट के लिए editor कॉम्पोनेंट, इनपुट सेटिंग्स और थीम कैसे बनाएँ। यह उन फ़्रंट-एंड डेवलपर्स के लिए है जिन्हें Webiny editor में अपने खुद के building blocks चाहिए।
कब इस्तेमाल करें
- ✓जब कोई डेवलपर Webiny Website Builder editor के लिए नया कॉम्पोनेंट बनाना चाहे।
- ✓जब किसी कॉम्पोनेंट में text, color या image सेटिंग्स जैसे इनपुट जोड़ने हों।
- ✓जब कोई डेवलपर Website Builder साइट के लिए CSS variables वाली थीम सेट करना चाहे।
Skill का लिंक
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/website-builder/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं Webiny Website Builder में एक कस्टम बटन कैसे बनाऊँ, जिसे मैं बाद में एडिट कर सकूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल बताती है कि editor असली Next.js ऐप लोड करता है, और कॉम्पोनेंट कोड में रजिस्टर होते हैं। वह दिखाती है कि उपयोगकर्ता कौन से इनपुट बदल सकते हैं और थीम को कैसे स्टाइल करें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Website Builder
TL;DR
The Webiny Website Builder uses a unique architecture: the Admin editor loads your Next.js app inside an iframe. All component code and styles live in your Next.js project -- Webiny only stores the page structure (which components and what input values). You build editor components with @webiny/website-builder-nextjs, register them via createComponent(), define configurable inputs, and manage theming through CSS custom properties and createTheme().
Architecture
+----------------------------------------------------------+
| Webiny Admin |
| +----------------------------------------------------+ |
| | Website Builder Editor | |
| | | |
| | sidebar +------------------------------+ | |
| | (inputs) | your Next.js app (iframe) | | |
| | | real components | | |
| | | real styles | | |
| | +------------------------------+ | |
| +----------------------------------------------------+ |
+----------------------------------------------------------+
postMessage (SDK)
+----------------------------------------------------------+
| Your Next.js App (running separately) |
| @webiny/website-builder-nextjs SDK installed |
+----------------------------------------------------------+
Key implications:
- No style clashes -- your components, your styles, full ownership
- Genuine WYSIWYG -- editors see your real app, not a simulation
- Framework-owned code -- all React components live in your Next.js repo
Setup
Starter Kit
git clone https://github.com/webiny/website-builder-nextjs.git my-website
cd my-website
npm install
Ensure @webiny/website-builder-nextjs and @webiny/sdk versions in package.json match your Webiny version (yarn webiny --version in your Webiny project).
Environment Variables
# .env
NEXT_PUBLIC_WEBSITE_BUILDER_API_KEY=your_wb_api_key
NEXT_PUBLIC_WEBSITE_BUILDER_API_HOST=https://your-cloudfront-url.cloudfront.net
NEXT_PUBLIC_WEBSITE_BUILDER_ADMIN_HOST=http://localhost:3001
NEXT_PUBLIC_WEBSITE_BUILDER_API_TENANT=root
Editor Components
An editor component has two parts:
- React component -- renders the UI, receives configured values via
inputsprop - Manifest -- metadata (name, label, group, inputs) that tells the editor about the component
Creating a Component
// src/editorComponents/Banner.tsx
import React from "react";
import { ComponentProps } from "@webiny/website-builder-nextjs";
interface BannerInputs {
headline: string;
ctaLabel: string;
ctaUrl: string;
}
export function Banner({ inputs: { headline, ctaLabel, ctaUrl } }: ComponentProps<BannerInputs>) {
return (
<div className="bg-primary py-12 px-6 text-center text-white">
<h2 className="text-3xl font-bold mb-4">{headline}</h2>
{ctaLabel && ctaUrl && (
<a
href={ctaUrl}
className="inline-block bg-white text-primary font-semibold px-6 py-3 rounded-md"
>
{ctaLabel}
</a>
)}
</div>
);
}
Registering Components
The editorComponents array must be in a "use client" file:
// src/editorComponents/index.tsx
"use client";
import { createComponent, createTextInput } from "@webiny/website-builder-nextjs";
import { Banner } from "./Banner";
export const editorComponents = [
createComponent(Banner, {
name: "Custom/Banner",
label: "Banner",
group: "custom",
inputs: [
createTextInput({
name: "headline",
label: "Headline",
description: "The main headline text.",
defaultValue: "Ready to get started?"
}),
createTextInput({
name: "ctaLabel",
label: "Button Label",
defaultValue: "Get started"
}),
createTextInput({
name: "ctaUrl",
label: "Button URL",
defaultValue: "/"
})
]
})
];
Important: The "use client" directive is required because component registration communicates with the editor via the browser. However, components imported here can still be Server Components if they don't have their own "use client" directive.
Component Name Convention
Use a namespaced string: `"YourNamespace/C
अक्सर पूछे जाने वाले सवाल
कॉम्पोनेंट का कोड कहाँ रहता है?
Next.js प्रोजेक्ट में, Webiny में नहीं। Webiny केवल यह सहेजता है कि कौन सा पेज कौन से कॉम्पोनेंट इस्तेमाल करता है और उनके लिए भरे गए मान।
कॉम्पोनेंट में किस तरह के इनपुट हो सकते हैं?
स्किल text, number, boolean, color, select, file या image, slot, rich text, object और tags जैसे इनपुट बताती है।
थीम कैसे काम करती है?
स्किल समझाती है कि CSS custom properties और एक theme setup फ़ंक्शन से रंग और स्टाइल कैसे संभालें।
जानकारी
लेखक का मूल विवरण
Building Website Builder editor components, theming, and CMS integration using @webiny/website-builder-nextjs. Use this skill when the developer wants to create editor components for the Website Builder, register components with createComponent, define configurable inputs (text, number, boolean, color, select, file/image, slot, lexical, object, tags), type the component's props correctly (especially file/image inputs, which are objects with { src, width, height, ... } and NOT plain strings, and lexical inputs which are { html, state } objects), set up component groups, customize the theme (CSS
repo: webiny/webiny-js
लोकप्रियता
- GitHub स्टार
- 8.1k
- रैंकिंग में स्थान
- #12618
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
prd-to-plan
8.1kयह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।
webiny-admin-architect
8.1kयह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।
webiny-admin-permissions
8.1kयह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।
webiny-form-model
8.1kयह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।