Unlayer Documentation

Unlayer Documentation

Welcome to Unlayer Documentation. It takes less than 5 minutes to get our editor up and running on your project.

These guides will take you through the process and get you up and running.

Get Started    

Social Media

🚧

Premium Tool

This tool is only available as an add-on in premium plans.

Social Media is a built-in tool that lets users add their social media icons to an email or web page.

Enable / Disable

unlayer.init({
  tools: {
    social: {
      enabled: false
    }
  }
});

Default Values

Social Media tool comes with the following default values. You can choose to change any of these.

Property

Default Value

icons

[]

spacing

5

align

center

containerPadding

10px

Here are a few examples on how to change these default values.

Icons

You can set the social media tool to come with default social networks and their URLs pre-filled.

unlayer.init({
  tools: {
    social: {
      properties: {
        icons: {
          value: {
            iconType: "squared",
            icons: [
              {name: "Facebook", url: "https://facebook.com/"},
              {name: "Twitter", url: "https://facebook.com/"},
            ]
          }
        }
      }
    }
  }
});

Icon Spacing

unlayer.init({
  tools: {
    social: {
      properties: {
        spacing: {
          value: 5
        }
      }
    }
  }
});

Alignment

unlayer.init({
  tools: {
    social: {
      properties: {
        align: {
          value: "center"
        }
      }
    }
  }
});

Container Padding

unlayer.init({
  tools: {
    social: {
      properties: {
        containerPadding: {
          value: "10px"
        }
      }
    }
  }
});

Updated 5 months ago


Social Media


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.