Skip to content

GemText

Displays text on a webpage.

Usage Example

/* (c) https://github.com/MontiCore/monticore */
package example_basic;

import mc.fenix.basic.GemText;
import common.ExamplePage;

page GemTextExample() {
  @ExamplePage(
    component = @GemText(
      value = "My text",
      color = "blue",
      size = "1rem",
      fontFamily = "'Lucida Console', Courier, monospace",
      fontStyle = "oblique 12deg",
      weight = "200",
      width = "200px",
      height = "3rem"
    ),
    basePath = "example_basic",
    componentName = "GemTextExample"
  );
}
GemTextExample

GUI Model

component GemText(
  String value,
  String color,
  String size,
  String fontStyle = "unset",
  String weight = "unset",
  String fontFamily = "unset",
  String width = "auto",
  String height = "auto"
)
Name Type Description Default value
value String Text content.
color String Text color in hex, rgb, color names, etc. (e.g. #000000, red)
size String Font size in px, %, em, etc.
fontStyle String Font style. Can be "normal", "italic", "oblique <deg>", or have a universal value "unset"
weight String Font weight. Can be "normal", "bold", "lighter", "<number>", or have a universal value "unset"
fontFamily String Font family. Example: "Gill Sans", sans-serif "unset"
width String Width of the text in px, %, em, etc. By default as wide as its content or the layout allows. "auto"
height String Height of the text in px, %, em, etc. By default as high as its content. "auto"