Components
Text

Text <ContzaText />

React component that renders a text with minimalistic formattings such as line breaks.

Props

childrenName of the field
nameAlternative way to specify the name of the field (can be overrided by 'children' prop)
placeholderPlaceholder text when editing the text (default: 'Enter Field Name...')

Examples

Here are a few examples how to use Text component.

Heading with description

import { ContzaText } from "@contza/react";
 
const Component = () => {
  return (
    <header>
      <h1>
        <ContzaText>Heading: Title</ContzaText>
      </h1>
      <p>
        <ContzaText>Heading: Description</ContzaText>
      </p>
    </header>
  );
};
 
export default Component;

Using the "name" prop

import { ContzaText } from "@contza/react";
 
const Component = () => {
  return (
    <header>
      <h1>
        <ContzaText name="Heading: Title" />
      </h1>
      <p>
        <ContzaText name="Heading: Description" />
      </p>
    </header>
  );
};
 
export default Component;