Embedding
Learn how to include your Mason features in your application.
Last updated
Learn how to include your Mason features in your application.
Last updated
If you haven't already, run through our to get your development environment ready to use Mason.
Mason features take a number of user-defined properties.
id
- a 24 byte string from the export modal (required)
- a function invoked before datasource fetching (optional)
- a function invoked before form submission (optional)
- a function invoked after form submission (optional)
Mason features use React under the hood, and integrate easily with a React codebase.
If you're including Mason features as HTML Custom Elements, you must pass your props as data attributes.
Because you can't pass functions as HTML attributes, you must use event subscribers to utilize callbacks with your HTML feature. See and for examples.