Home > @uniformdev/canvas-vue

canvas-vue package

Functions

Function

Description

convertComponentToProps(component)

Converts a raw Canvas component instance to Vue component props format. This merges each parameter moved to the root object and removes the 'value' node, hugely simplifying rendering code. For example if the raw object has parameters.foo.value, then the final props have props.foo === raw.parameters.foo.value.

renderComponent({ component, resolveRenderer, indexInSlot, slotName, parentComponent, slotChildrenCount, emptyPlaceholder, }, input)

useUniformContextualEditing({ initialCompositionValue, enhance, }, input)

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.

useUniformContextualEditingState({ global: isGlobal, }, input)

Returns the state of contextual editing, when the app is open inside Canvas Editor. This hook can be used to improve the editing experience of your team. For example: You can use selectedComponentReference to control which element to show inside a carousel or an accordion.

useUniformCurrentComponent()

Gets the data of the closest <UniformComponent /> ancestor.

useUniformCurrentComposition()

Gets the data of the closest <UniformComposition /> ancestor.

Interfaces

Interface

Description

PersonalizeComponent

TestComponent

Variables

Variable

Description

DefaultNotImplementedComponent

globalCompositionEnhancerInjectionKey

HeadingRichTextNode

LinkRichTextNode

ListItemRichTextNode

ListRichTextNode

ParagraphRichTextNode

QuoteRichTextNode

RootRichTextNode

TableCellRichTextNode

TableRichTextNode

TableRowRichTextNode

TextRichTextNode

UniformComponent

Allows the rendering of a Canvas component instance (root or not), and its children if it has any. Note that the actual rendering happens inside <UniformSlot />, which you should use in most cases.

UniformComposition

The main component to render a Canvas composition. It renders the full tree of components, and provides some services to the children, such as useUniformCurrentComposition. It also takes care of enabling [Contextual Editing](https://docs.uniform.app/capabilities/composition/contextual-editing).

UniformPlayground

Playground where you can freely live preview your components and patterns.

UniformRichText

UniformRichTextNode

UniformSlot

Renders the content of a Canvas composition's slot

UniformText

Renders text parameters. Offers inline editing capability out of the box.

Type Aliases

Type Alias

Description

ComponentProps

Props passed to a Canvas component implementation. TProps is the Canvas component's parameters object after all enhancers have been applied.

DefaultNotImplementedComponentProps

RenderRichTextComponentResolver

Function that maps a Rich Text node instance to its React component to render it. The resolver would commonly inspect the type of the component to decide.

ResolveRenderer

RichTextComponentProps

RichTextRendererComponent

UniformComponentProps

UniformCompositionProps

UniformPlaygroundProps

UniformRichTextNodeProps

UniformRichTextProps

UniformSlotProps

UniformTextProps

UseUniformContextualEditingProps

UseUniformContextualEditingStateProps

UseUniformContextualEditingStateReturnType