### Initialize Development Environment Source: https://github.com/algorismus-io/elementor-jsx/blob/main/README.md Clones the repository, installs dependencies, sets up the Docker stack, and runs the test suites. ```bash git clone https://github.com/Algorismus-io/elementor-jsx && cd elementor-jsx && npm install EXJSX_ULTRA_ZIP=/path/to/elementor-ultra-mcp.zip sh dev/setup.sh npm test # 522 offline tests EXJSX_IT=1 npm run test:it # 39 live tests against the fresh stack ``` -------------------------------- ### Initialize and deploy an elementor-jsx project Source: https://github.com/algorismus-io/elementor-jsx/blob/main/README.md Commands to install the package, scaffold a new project, compile JSX to Elementor JSON, and deploy the bundle to a WordPress site. ```bash npm i -D @algorismus/elementor-jsx npx exjsx init site # scaffold theme.mjs + pages/home.page.jsx npx exjsx build site # compile → site/site.bundle.json WP_URL=https://your-site.com WP_USER=admin WP_APP_PASSWORD=xxxx \ npx exjsx deploy site/site.bundle.json ``` -------------------------------- ### Define Site Parts Source: https://github.com/algorismus-io/elementor-jsx/blob/main/test/README.md Example syntax for defining site parts like headers and footers within the Elementor JSX framework. ```javascript defineSite({ parts: { header, footer } }) ``` -------------------------------- ### Generate sample video asset Source: https://github.com/algorismus-io/elementor-jsx/blob/main/test/README.md Command to generate a small sample video file required for the kitchen video widget tests. ```bash ffmpeg -f lavfi -i testsrc=duration=0.5:size=64x64:rate=10 -pix_fmt yuv420p out.mp4 ``` -------------------------------- ### Environment-Aware URL Handling Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Avoid hardcoding development host URLs; use WP_URL or sideloading to ensure portability. ```text WP_URL ``` -------------------------------- ### Define Theme Configuration Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use defineTheme for brand colors, fonts, and spacing to ensure consistency across components. ```javascript defineTheme ``` -------------------------------- ### CLI Commands Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Commands for managing the project lifecycle including building, deploying, linting, and local development. ```APIDOC ## CLI Commands ### exjsx build Builds the project in the specified directory. ### exjsx deploy Deploys the project bundle. Idempotent; detects Elementor version over REST. ### exjsx lint Lints the project directory. ### exjsx dev [--gates] Starts a live development server with watch, rebuild, and smart deploy capabilities. The --gates flag re-runs the eu-studio check on changed pages. ``` -------------------------------- ### Execute Test Suites Source: https://github.com/algorismus-io/elementor-jsx/blob/main/README.md Commands to run unit tests or live integration tests against the WordPress stack. ```bash npm test ``` ```bash EXJSX_IT=1 npm run test:it ``` -------------------------------- ### navBar Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Creates a complete header component including desktop rail, dropdown mega-menus, and mobile hamburger menu. ```APIDOC ## navBar(props) ### Description Generates a self-contained header component that is immune to common flex-slot layout bugs. ### Parameters - **logo** (any) - Required - The logo element. - **links** (array) - Required - An array of [label, href] pairs. - **ctas** (any) - Optional - Call to action elements. - **accent** (string) - Optional - Accent color. - **ink** (string) - Optional - Text/ink color. ``` -------------------------------- ### button Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Creates a standard button component with a required href. ```APIDOC ## button(text, href, envelopeProps?) ### Description Creates a button component. Note that a real href is required (no '#'). ### Parameters - **text** (string) - Required - The button label. - **href** (string) - Required - The destination URL. - **envelopeProps** (object) - Optional - Atomic envelope properties. ``` -------------------------------- ### Placeholder Link Usage Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use placeholder links for development, but ensure they are wired or replaced with section anchors before production. ```text href="#" ``` -------------------------------- ### form Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Constructs a Pro form component using field and submit helpers. ```APIDOC ## form(props, children) ### Description Creates a form component. Requires the use of `collect-submissions` action for Elementor 4.2.x+. ### Parameters - **name** (string) - Required - The form name. - **actions** (array) - Required - List of actions, e.g., ['collect-submissions']. ``` -------------------------------- ### Execute Corpus Tests Source: https://github.com/algorismus-io/elementor-jsx/blob/main/test/corpus/RESULTS.md Commands to run the corpus test suite with various configuration options. ```bash EXJSX_IT_PLAYWRIGHT=…/playwright/index.mjs npm run corpus # full run npm run corpus -- --only shadcn # one component npm run corpus -- --skip-deploy # rescore without deploying ``` -------------------------------- ### Styling with Tailwind and sx props Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use tw for standard layout and spacing, and sx props for theme-aware or computed values. ```jsx tw="…" ``` ```jsx pad={{t:64}}, grad={[160,'#111','#333']}, size={47} ``` -------------------------------- ### Create Component Factories Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use factory functions to generate new instances of kit-nodes to avoid duplicate ID errors. ```javascript const Rule = () => divider(…) ``` -------------------------------- ### Data-Driven Page Generation Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use the fromData helper for repetitive page structures instead of manual duplication. ```javascript fromData(items, map) ``` -------------------------------- ### Provide Theme via Context Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use the Page component to provide the theme context to the component tree. ```jsx ``` -------------------------------- ### Page SEO Configuration Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Every page must include an SEO object containing at least a title and description. ```javascript seo: { title, description } ``` -------------------------------- ### Project Directory Structure Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md The canonical fs-project layout for elementor-jsx sites, defining where configuration, content, chrome, and data files reside. ```text mysite/ site.config.mjs # (optional) project config ONLY: { name?, template? } theme.mjs # (optional) defineTheme tokens ONLY — the one place brand values live pages/ # CONTENT — *.page.jsx files only (discovery errors on strays) home.page.jsx # default-exports a component; `export const meta = {…}` per-page about-us.page.jsx # slug = filename (nested dirs join with '-'); meta.slug overrides locations/[city].page.jsx # dynamic: `export const data = () => [{slug,title,seo?,props?}]` parts/ # CHROME — .part.jsx, type ∈ header|footer|single|archive|error404|popup header.part.jsx components/ # shared section components (free-form, imported by pages) data/ media.manifest.mjs # data arrays · image slots { slot: { url|file, alt } } ``` -------------------------------- ### Run Elementor JSX Studio Commands Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Use these commands to verify page structures, perform interaction tests, diagnose health issues, and manage CSS dependencies. ```bash eu-studio verify --pages /,/about/ [--widths 1200,1512,390] # structural matrix, one call eu-studio clicktest --form /contact/ --accordion /pricing/ --burger / --nav /=about eu-studio doctor # health + auto-heal; NAMES failing stylesheets — run this instead of # hand-grepping page HTML when styles look broken eu-studio carry-css --page … # make pages independent of a flaky css file store ``` -------------------------------- ### Elementor JSX CLI Commands Source: https://github.com/algorismus-io/elementor-jsx/blob/main/README.md Common CLI operations for scaffolding, building, deploying, and inspecting Elementor JSX projects. ```bash npx exjsx init [dir] # scaffold a minimal fs-project npx exjsx build site.jsx # offline: JSX -> deployable bundle npx exjsx build mysite/ # fs-project: pages/ + parts/ + theme.mjs discovered & wired npx exjsx deploy site.bundle.json # 2 kit writes + N page upserts (idempotent) npx exjsx watch site.jsx --deploy # rebuild+deploy on save npx exjsx build site.jsx --inline # self-contained pages (multi-tenant kits) npx exjsx decompile tree.json # adopt an existing Elementor page into JSX npx exjsx lint site.jsx --strict # conventions check (CONVENTIONS.md) — CI gate npx exjsx inspect site.bundle.json # readable bundle dump (custom_css decoded) npx exjsx media manifest.mjs # hash-cached asset sideloading ``` -------------------------------- ### formSuccess Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Displays a success banner after a form submission. ```APIDOC ## formSuccess(props) ### Description Displays a canned success banner that hides the form upon successful Pro ajax submission. ### Parameters - **message** (string) - Optional - Success message text. - **sub** (string) - Optional - Submission details. - **accent** (string) - Optional - Accent color. ``` -------------------------------- ### Applying raw CSS Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use raw for non-atomic CSS like nested selectors or pseudo-classes, ensuring it is applied last. ```jsx raw="…" ``` -------------------------------- ### Define an Elementor site with JSX Source: https://github.com/algorismus-io/elementor-jsx/blob/main/README.md Use defineSite to structure site parts, themes, and pages. This configuration allows for dynamic templates and component-based design. ```jsx import { defineSite } from 'elementor-jsx'; import { defineTheme } from 'elementor-jsx/theme'; import { dyn, loopGrid } from 'elementor-jsx/kit'; const theme = defineTheme({ name: 'brand', color: { primary: '#B31E2C', ink: '#101418' }, font: { head: 'Sora' } }); export default defineSite({ name: 'mysite', theme, parts: { header: { node: }, // site-wide (Pro theme-builder) footer: { node: }, single: { node: }, // dynamic post template archive: { node: }, error404:{ node: }, popup: { node: , display: { pageLoad: 2 } }, }, pages: [{ title: 'Home', slug: 'home', template: 'elementor_header_footer', seo: { title: 'Home | Brand', description: '…', ogImage: 'https://…' }, node: (

Hello

Tailwind subset works too. {loopGrid({ source: 'post', perPage: 3 }, [/* dyn.postTitle() … */])}
), }], }); ``` -------------------------------- ### Responsive Mobile Burger Wrapper Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Wrap hidden mobile widgets in a box to ensure they do not occupy flex space when hidden, preventing layout shifts in headers. ```jsx ``` -------------------------------- ### Importing from elementor-jsx Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use a single bare specifier to import public primitives from the package barrel. ```javascript import { DIM, PDIM, node } from 'elementor-jsx' ``` -------------------------------- ### Create an atomic form Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Constructs a complete form using field definitions and a submit button. Requires the 'collect-submissions' action for compatibility with Elementor Pro. ```javascript form({ name:'contact', actions:['collect-submissions'] }, [ field('name', 'Name'), field('email', 'Email', { type:'email' }), field('msg', 'Message', { textarea:true, rows:5 }), formSubmit('Send message'), // ← form() does NOT add a submit button by itself ]) ``` -------------------------------- ### Page Template Selection Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Specify the template type; use elementor_canvas for standalone pages and elementor_header_footer for theme-integrated pages. ```javascript template: 'elementor_canvas' ``` ```javascript template: 'elementor_header_footer' ``` -------------------------------- ### Dynamic Text Binding Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Bind CMS-driven content using the dyn attribute; note that children are ignored when this attribute is present. ```jsx dyn={dyn.postTitle()} ``` -------------------------------- ### Access Theme Variables Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Components should access theme properties via t.color.primary rather than hardcoding hex values. ```javascript t.color.primary ``` -------------------------------- ### Text Intrinsic Styling Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use a shared constant for styling inline elements within text intrinsics. ```text raw="& strong {…} & em {…}" ``` -------------------------------- ### Define Shared Classes Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Assign a cls prop to visual patterns used three or more times to ensure clean class naming in the Elementor Class Manager. ```jsx cls="card" ``` -------------------------------- ### JSX Intrinsic Tags Source: https://github.com/algorismus-io/elementor-jsx/blob/main/docs/API-CARD.md Available JSX tags for building layouts and content, along with their special properties. ```APIDOC ## JSX Intrinsic Tags ### Available Tags - **Containers**: `box`, `div`, `col`, `row`, `section` (flex containers) - **Headings**: `h1`, `h2`, `h3`, `h4`, `heading` - **Text**: `text`, `p` (use `href` for links) - **Media**: `img` (supports URL string or attachment ID) - **Raw**: `html` (for raw HTML/SVG/style/script) ### Special Properties All intrinsics support the following props: - **tw**: Tailwind subset string - **raw**: CSS declarations - **cls**: Semantic class label - **gcls**: Arbitrary extra class - **id**: HTML anchor ID - **animate**: Animation configuration object (effect, trigger, etc.) - **tag**: Container tag override (e.g., header, footer, article, aside, a, button) ``` -------------------------------- ### Manual Font Loading Source: https://github.com/algorismus-io/elementor-jsx/blob/main/CONVENTIONS.md Use fontLoader when a font family is only referenced in raw HTML or CSS to prevent silent fallback issues. ```javascript fontLoader('Family',[400,700]) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.