HTML
The HTML
component in GridStudio allows developers to render raw HTML markup directly inside a Custom View. This is useful when you want full control over layout or need to inject small widgets, static content, or stylized elements not covered by other SDK components.
Use Cases
- Displaying static instructions or formatted help content
- Embedding simple HTML widgets (e.g., badges, notices)
- Injecting inline visuals using native HTML
Example
CustomFunction(async function ({ sdk }, reject, resolve) {
resolve(async function CustomFunction({ sdk }) {
sdk.options = function () {
return {
html: `<div style="padding: 20px; background-color: #f0f0f0; border-radius: 8px;">
<h2>Welcome!</h2>
<p>This is a <strong>custom HTML view</strong> rendered using GridStudio's HTML component.</p>
</div>`,
}
}
})
})
Configuration
Field | Type | Description |
---|---|---|
html | string | The raw HTML string to be rendered. It can be dynamic. |
You can return the html
key from the sdk.options
function. The HTML will be injected as-is into the rendered view.
Best Practices
- Avoid heavy scripts or external dependencies inside the HTML.
- Use inline CSS or scoped styles for consistency.
- Prefer native SDK components when possible to ensure theme consistency.