Skip to main content

WMX Component Schema

WMX Components allow developers to build custom React Native components that integrate directly into WaveMaker Studio. Each component includes UI logic, metadata configuration, and optional visual assets.


Component Structure

All WMX components must be placed inside:

src/main/webapp/extensions/components/src

Each component should follow this structure:

    componentname/
├── index.tsx
├── wmx.json
└── icon.svg (optional)
FilePurpose
index.tsxContains UI and component logic
wmx.jsonDefines properties, events, and styles
icon.svgOptional Studio icon

wmx.json Overview

The wmx.json file defines how the component appears and behaves in WaveMaker Studio.

Example

 {
"name": "myComponent",
"displayName": "My component",
"description": "Sample WMX component",
"webSupport": true,
"iconUrl": "icon.svg",
"props": {},
"events": {},
"styles": {}
}

Metadata Fields

FieldDescriptionRequired
nameUnique lowercase identifierYes
displayNameName shown in StudioNo
descriptionHelp textNo
iconUrlSVG icon pathNo
webSupportEnables web previewNo
propsDefines component propertiesNo
eventsDefines component eventsNo
stylesDefines styling optionsNo

Property Schema

Defines configurable component inputs.

FieldDescription
nameProperty identifier
typestring, number, boolean, object
defaultValueDefault property value
isListSupports array values
isRequiredMarks property mandatory

Event Schema

Defines events triggered by user interaction or state change.

FieldDescription
nameEvent identifier
displayNameStudio label
descriptionEvent usage details

Style Schema

Defines styling options exposed to Studio.

FieldDescription
nameStyle identifier
styleDefault style value

index.tsx Overview

The index.tsx file contains the React Native implementation of the component.

Example

    import * as React from 'react';
import { View, Text } from 'react-native';

const MyComponent = ({ title = "Hello World" }) => (
<View>
<Text>{title}</Text>
</View>
);

export default MyComponent;


icon.svg Guidelines

  • SVG format only
  • Transparent background recommended
  • Suggested stroke color: #737373

Summary

WMX components combine React Native UI development with metadata-driven configuration. Proper schema definition ensures components remain reusable, configurable, and easy to integrate within WaveMaker Studio.