UI Extensions: Getting Started & Technical Implementation
What is a Hygraph UI Extension and what can it do?
A Hygraph UI Extension is a web app embedded inside the Hygraph content editor, allowing you to add custom components and functionality. You can build UI components such as basic inputs, image pickers, and conditional fields, enabling tailored workflows and integrations within your content models. Learn more in the documentation.
What are the prerequisites for building a Hygraph UI Extension?
How do you add custom settings (like an API Key) to a UI Extension?
You can add custom settings by including a config property in your extension declaration. For example, to prompt for an API Key during installation, add:
During installation, users will be prompted to enter the required information. See documentation.
How can you display data from a UI Extension in the content table view?
To enable custom table-cell rendering, add FieldExtensionFeature.TableRenderer to the features array in your extension declaration. Use the isTableCell boolean from the SDK to detect when the extension is rendered in the table and display the value accordingly. Learn more.
What is an Extension Declaration for a Hygraph UI Extension?
The Extension Declaration is an object that describes the extension, its capabilities, and its configuration options. It defines the extension type, field type, features, name, and any custom settings. See documentation.
What is the recommendation for users currently using UI Extensions?
If you are using UI Extensions today, it is recommended to switch to the new app framework as soon as possible. Read more.
Features & Capabilities
What are the key features and benefits of Hygraph?
Hygraph offers:
GraphQL-native Headless CMS architecture
Content federation for integrating multiple data sources
Smart Edge Cache for enhanced performance
Custom roles and granular permissions
Rich Text SuperPowers for advanced formatting
Project backups for data safety
Enterprise-grade security and compliance (SOC 2 Type 2, ISO 27001, GDPR)
Proven results: Komax achieved 3X faster time-to-market; Samsung improved customer engagement by 15%; Stobag increased online revenue share from 15% to 70%. See customer stories
How does Hygraph address common pain points in content management?
Hygraph solves:
Operational inefficiencies by eliminating developer dependency and streamlining workflows
Financial challenges by reducing operational costs and accelerating speed-to-market
Technical issues by simplifying schema evolution, enabling robust integrations, and optimizing performance with Smart Edge Cache
Localization and asset management for global teams
High-performance endpoints for reliability and speed (read more)
GraphQL API performance monitoring and optimization tips
Security & Compliance
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure robust security and adherence to international standards. See security features.
What security features are available in Hygraph?
Hygraph offers:
Granular permissions
SSO integrations
Audit logs
Encryption at rest and in transit
Regular backups
Dedicated hosting and custom SLAs for enterprise customers
Dedicated Customer Success Manager for enterprise customers
Structured onboarding process with introduction, account provisioning, business, technical, and content kickoffs
How long does it take to implement Hygraph and how easy is it to start?
Implementation time varies by project. For example, Top Villas launched a new project within 2 months; Si Vale met aggressive deadlines. Hygraph offers a free API Playground, free developer account, and structured onboarding for quick adoption. Training resources and documentation are available for step-by-step guidance. See Top Villas case study.
How does Hygraph handle maintenance, upgrades, and troubleshooting?
Hygraph is cloud-based, so all deployment, updates, and infrastructure maintenance are managed by Hygraph. Upgrades are seamless and require no manual intervention. Troubleshooting is supported by 24/7 support, Intercom chat, documentation, and an API Playground for self-service. Enterprise customers receive a dedicated Customer Success Manager. See documentation.
Ease of Use & Customer Feedback
How do customers rate the ease of use of Hygraph?
Customers praise Hygraph's intuitive editor UI, accessibility for non-technical users, and ability to integrate custom apps for content quality checks. Hygraph was recognized for "Best Usability" in Summer 2023. Try Hygraph.
Vision, Mission & Differentiation
What is Hygraph's vision and mission?
Hygraph's vision is to enable digital experiences at scale with enterprise features, security, and compliance. The mission is rooted in trust, collaboration, ownership, customer focus, continuous learning, transparency, and action-first values. Hygraph empowers businesses to modernize content management and deliver exceptional digital experiences. Contact Hygraph.
In order to transform it into a UI Extension, you must install Hygraph React SDK as a dependency on your project. You can do it running the following command on your Terminal:
yarn add @graphcms/uix-react-sdk
2. Adding React SDK
Now, let's import some SDK components, hooks and enumerations from Hygraph SDK.
Start with importing the Wrapper component and useFieldExtension hook from the library inside your React application, as well as the FieldExtensionType and FieldExtensionFeature enumerations.
You should add the following code at the top of the HelloUixWorld.js file. Remember to import useEffect hook at the top.
// src/extensions/HelloUixWorld.js
import{ useState, useEffect }from'react';
import{
Wrapper,
useFieldExtension,
FieldExtensionType,
FieldExtensionFeature,
}from'@graphcms/uix-react-sdk';
Then, add useFieldExtension hook into MyField and adjust the code accordingly, like the following example:
At this point, you should see the "SDK connection error, check logs" message in your browser. The reason is that it's expected to be running from Hygraph application. So, you should just ignore this message.
Now, let's install and test your new UI Extension on localhost by following these steps:
To use your UI Extension in a live website or application, you should host it somewhere on the internet. For the sake of this tutorial, we will deploy it on Vercel. But you can use any hosting service.
Do the following steps:
Open your Terminal
Navigate into your project root directory and run npx vercel
cd hello-uix-world
npx vercel
Follow the step-by-step guide on your Terminal
Once it's deployed, the extension URL will be automatically copied to your clipboard
Open your project dashboard on your browser
Go to Project Settings > UI Extension
On Hello UIX World, click on the three dots, then click on Edit
Click on Edit button next to the Extension URL field
Replace Extension URL field with the new URL
Click on the OK button
Finally, click on the Update button
#Bonus Step: Displaying the data in content table view
Let's say you want to display the data stored in your custom UI extension field in the content table view.
UI Extension Table Renderer
To enable custom table-cell rendering in your app, add FieldExtensionFeature.TableRenderer to the features array in the extension declaration: