Products

Canvas

Uniform Canvas provides composition services to your applications. It also incorporates other services such as classification and personalization into the composition process.

Uniform Canvas allows business users to have complete control over the presentation layer and build compositions from the components sourcing content from multiple Headless Content Management Systems and Headless Ecommerce Platforms. Such compositions are built without any changes required to the front-end code, and edge-based personalization and A/B testing features are seamlessly integrated.

Uniform Canvas comes with a notion of a Component Library for the front-end developers to register components with, powerful SDK to integrate Canvas with the existing modern JavaScript applications.

To understand the value of Canvas, consider the following three major use cases as key pillars:

  1. Layout layer (the "neck") for the Headless, API-first world

    Using Headless Content Management Systems and / or Headless e-commerce allow developers to use any modern tool they want on the front-end and deliver solutions that are performant out of the box, highly scalable, and secure. The developers have the option to use the Jamstack approach (or Jamstack Hybrid) and deploy to a modern platform, like Netlify, Vercel or Cloudflare. This makes both developers and IT happy.

    However, this leaves the marketers and non-technical users in a bad place - they're unable to maintain control over the presentation layer. Code changes are needed to build new pages or experiences. Business users aren't able to use the best-of-breed headless technologies to launch new landing pages / campaigns without developer involvement and integration cost. They also often can't preview the content in context.

    This sets the Enterprise adoption of Headless technologies back in terms of flexibility and capabilities and limits the ability to achieve fast time to market and overall user productivity. Canvas brings the balance back into the modern MACH/Jamstack/Headless world, where business users now have the ability to create and manage experience-level entities (pages, screens, etc.) without requiring to make code changes.

  2. Integrated personalization and A/B testing that's dead simple

    Digitally ambitious marketers didn't give up on the idea of doing personalization and A/B testing at scale. The current generation of Digital Experience Platforms (DXPs) failed to support this use case without compromising performance and operational cost/scale.

    The ability to configure personalization and testing in the same place where the presentation layer is built is an incredible boost to productivity and simplification of getting started with these capabilities.

  3. Multi-source experience composition

    As both the idea of a Composable DXP and MACH architecture is getting traction; this prescribes that there is no single system of record for content. A Headless CMS of choice owns the marketing content while e-Commerce system of choice owns the product data, the media assets are owned by a Digital Asset Management system, so on.

    It's cumbersome and often impossible for non-technical users to compose an experience (page, mobile screen, kiosk screen) sourced from multiple places (marketing content from one Headless Content Platform and product data from another Headless Commerce Platform).

Localization is set up in the Canvas user interface. The following is an example of the JSON object that represents a slot with components localized for two locales (such as en-us and dk-dk):

The description above is represented in Uniform in the following way:

localized-components

Localization is configured within Uniform Canvas. For information on how to configure localization, see the localization guide.

The following parameter types are always available.

Parameter typeDescription
CheckboxUsed for values where the user can select yes/no, true/false, on/off, etc.
Dropdown listUsed for values where the user can select one value from a predefined list of options.
JSON DataUsed for any kind of JSON based data structures.
LinkUsed for links to Project map nodes.
NumberUsed for numeric values.
TextUsed for text values.
Image URLUsed for simple image values.

tip

When you add an integration to your project, new parameter types are often added to your project. This isn't the case for all integrations, but it's true for most. So if you are looking for a parameter type that's not included in the list of parameter types, check to see if you have added the required integration.

info

Unlike the parameter types added by integrations, these parameters don't require enhancers because the value the user provides is the value the front-end component should use.

The Checkbox parameter type has no configuration settings. It simply displays a checkbox for the user along with the Parameter Name value.

import CodeBlock from '@theme/CodeBlock';

The Dropdown List parameter lets a user select a single value from a list options that are assigned to the parameter. It's used when you want to limit the options that are available to the user.

This parameter type has the following configuration settings:

NameDescription
OptionsThe values that populate the dropdown list. The individual options are separated by the pipe character |.
For example, if you want the user to select from "top," "middle" and "bottom," you would use the following value:
top|middle|bottom
This parameter type also support cases where the value used is different from the value the user selects from. For example, if you want the user to select from "greater than," "equal to" and "less than," but you want the selected value to be ">," "=" or "<," you would use the following value:
greater than:>|equal to:=|less than:<
RequiredIndicates whether the value is required when the component is used.

The JSON Data parameter lets you store any data that's serialized in valid JSON.

This parameter type has the following configuration settings:

NameDescription
Expected JSON schemaBy providing a JSON schema you can provide validation rules to specify the expected shape and value types of the parameters JSON data.
The JSON schema needs to follow the Draft 7 specification.
RequiredIndicates whether the value is required when the component is used.

The Link parameter lets a user create a link to a node in a project map, or simple static URL, or email address or telephone number.

In the case of project map, the link will automatically update when the path of the node is updated by moving the node to another location in the node tree.

This parameter type has the following configuration settings:

NameDescription
RequiredIndicates whether setting a link is required when the component is used. Default: false.
Types of linksTypes of link you can configure in parameter: Project Map, URL, Email address, Telephone number. By default all types are enabled.

Project map

Url or Email address or Telephone number

The Number parameter lets a user enter a numeric value. This parameter type has the following configuration settings:

NameDescriptionNotes
RequiredIndicates whether the value is required when the component is used.
IntegerUse this when the number is a whole number (such as 3, 17, 101, 5000).
DecimalUse this when the number is a fractional number (such as 12.44, 400.00, 1044.80).
Number of decimal placesThis controls wow precise a number can the user enter.This option is only available for decimal numbers.
MinimumThe user can't enter a value less than this.Optional
MaximumThe user can't enter a value greater than this.Optional

tip

Notice that the value is stored as a string, not as a number.

The Number parameter lets a user enter a text value. This parameter type has the following configuration settings:

NameDescriptionNotes
RequiredIndicates whether the value is required when the component is used.
Allow multi-line textIf ticked, the user enters the text into a multi-line text box.Multi-line text is saved in a string with the line-break character \n used to separate lines.
Lines countMaximum number of lines of text the user can enter.Only available when the allow multi-line text option is enabled.
Validation Regex (optional)Validation logic that limits the text the user can enter.This uses the regular expression features in the user's browser.
Validation Regex MessageMessage displayed to the user when the input doesn't match the validation regex.Only used if the validation regex is specified.

The Image URL parameter provides a field in which to add a link to an externally-hosted image URL. This parameter type has the following configuration settings:

NameDescriptionNotes
RequiredIndicates whether the value is required when the component is used.
Validation Regex (optional)Validation logic that limits the text the user can enter.This uses the regular expression features in the user's browser.
Validation Regex MessageMessage displayed to the user when the input doesn't match the validation regex.Only used if the validation regex is specified.

note

Uniform doesn't optimize the image when rendered in canvas. Try to keep the image file size as small as possible.

The specific places in Uniform where your custom integration appears are configured using the Location Configuration field from the team integration configuration form. The following describes the JSON object used to specify this configuration.

AttributesDescription
baseLocationUrl
url
The prefix for relative URLs specified in the locations section.
locations
object
The places in Uniform where the custom integration is used.
AttributesDescription
canvas
object
Details that determine where in the Uniform Canvas user interface the custom integration is used.
install
object
Route for the page that enables a Canvas editor to set values on the parameter in a composition.
settings
object
Details that determine how the custom integration is configured.
AttributesDescription
parameterTypes objectArray of definitions of the parameter types the custom integration supports.
AttributeDescription
type
string
Unique identifier for the parameter type.
displayName stringLabel that's displayed in Canvas when the parameter is configured or edited.
configureUrl
string
Route for the page that enables a Canvas administrator to configure settings for the parameter that control the user experience for Canvas editors.
editorUrl
string
Route for the page that enables a Canvas editor to set values on the parameter in a composition.
AttributeDescription
description
string
Text that's displayed when a Uniform editor adds the custom integration to a project.
Each member of the array is displayed as a separate paragraph. You can include HTML tags in these strings.
AttributeDescription
url
string
Route for the page that enables a Canvas administrator to configure the custom integration. For example, routes to external APIs and API keys are typically configured in the settings.

note

For more information, see Locations.