Skip to main content




Provides services to render a tree of Canvas components.
- Members
The composition instance to render.
+ show child attributes
Resolves the React component that is responsible for rendering a Canvas component in a slot.
  • componentComponentInstance
    + show child attributes
  • Promise<JSX.Element>- Component was resolved.
  • Promise<null>- No component was resolved.
For more information, see example in our developer guide.
behaviorTrackingstring (optional, default value: onView)
If you are using Uniform's classification and tracking features, this property controls when tracking takes place and whether the component is wrapped in any sort of markup.
onLoad - Tracking runs when the page is loaded using the TrackFragment component. When rendered, the component is not wrapped in any markup.
onView - Tracking runs when the component enters the viewport using the Track component. When rendered, the component is wrapped in a div tag, which may cause problems with certain forms of CSS. In this case, use the onLoad value.
For more information, see example in our developer guide.
If your app uses enhancers, you'll need to pass a function to enhance the data when using contextual editing in Visual Canvas. This function is called on the client side.
  • compositionRootComponentInstance
Returns: Promise<RootComponentInstance>- The enhanced composition



Coming soon.



Returns the data of the closest <UniformComposition /> ancestor, or an empty object if none was found.
- Return
{ data?: RootComponentInstance, behaviorTracking?: 'onLoad' | 'onView', resolveRenderer?: Function }


Returns the data of the closest <UniformComponent /> ancestor, or an empty object if none was found.
- Return
{ data?: ComponentInstance, behaviorTracking?: 'onLoad' | 'onView', resolveRenderer?: Function }


Adds contextual editing capability to a Uniform app.
This hook is already integrated in <UniformComposition />, you won't need to use it directly, unless you have a custom setup.
- Arguments
The initial composition value to render. If applicable, the composition should be enhanced. This is typically the composition provided by getStaticProps.
enhance(composition, hash)
A function to enhance the composition sent by Canvas editor.
  • compositionRootComponentInstance
  • hashstring (optional)- The hash provided by Canvas editor to verify the authenticity of the request.
Returns: Promise<RootComponentInstance>
- Return
{ composition: RootComponentInstance }An object containing the composition coming from Canvas editor.



Creates an enhance function based on an API endpoint for the hook useUniformContextualEditing.
- Arguments
An endpoint that takes a composition and returns an enhanced one. It should handle POST requests.
On Next.js projects, this is typically "/api/preview".