Skip to main content
Skip table of contents

Text Widget

The Text Widget component can be used to include text panel in the layout of Apps created with the App Builder components. Like other Widgets, Image Widgets can be included inside Tabs of the App, or directly into Containers. The component supports plain text but also github-flavored markdown with a ShapeDiver-specific extension to define colored text.

Overview

The component includes a single text input and outputs a widget that can be included in the Aa ShapeDiver-specific extensionpp's layout.

image-20240801-103103.png
image-20240801-103124.png

Note that the viewer container is empty in this example, because no display geometry is specified in the definition.

Markdown syntax

The text widget uses the GitHub-flavored version of markdown. The full list of formatting instructions is available here. We recall below some of the basic markdown syntax:

# This is a H1 heading.

## This is a H2 heading.

This is normal text.

*This is italicized text.*

**This is bolded text.**

* This is a bullet point.

This is [a link](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax).

image-20240801-101501.png

Table formatting

The version of markdown supported by the component allows the formatting of tables in the text panels.

image-20240801-102618.png
image-20240801-102637.png

Download an example Grasshopper definition including a cluster to easily format tables for the text widget.

Text coloring with the ShapeDiver extension

The following syntax can be used to color a portion of text:

This is how to color :span[some words in blue]{color="blue"}.

image-20240801-094841.png

It is possible to specify some primary colors by their name (such as “blue” in the example above). Alternatively, any color can be specified using its hexadecimal representation:

Use a hashtag in front :span[of the hexa code]{color="#E233F3"}.

image-20240801-095201.png

One can combine the extension with other markdown instructions:

*:span[This is italic text.]{color="green"}*

image-20240801-095402.png

The ShapeDiver extension might be used in the future for further improvements of the Text Widget.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.