Skip to content

JSX (dashboard)

The Membrane dashboard uses a custom JSX implementation. This reference page covers all valid elements and styles.

We use flex layout for styling, so your existing mental model from CSS Flexbox should mostly apply here.

All elements except for string can accept these props:

  • style?: valid properties specific by element (see below)
  • children?: child element(s), can be string | number | boolean | null | undefined or another JSX element
  • key?: string | number: unique identifier for element in lists
  • tooltip?: string: Helpful text that appears when hovering over the element

A vertical container element.

Props

A horizontal container element.

Props

A text element.

Props

  • style?: accepts flex, sizing, and box styles
  • numberOfLines?: dictates maximum number of lines to display before truncating
  • format?: "markdown" | string: content format - “markdown” renders the content as markdown
  • All base props

A string element for rendering scalar values. Lower level than <text>.

Props

  • gref: reference to the value to be rendered
  • value?: Gref: Text to be rendered

A clickable button element.

Props

An image display element.

Props

An element for embedding complex data structures.

Props

  • style: accepts container, flex, sizing, and box styles
  • gref: reference (gref) to the data to be embedded
  • compact?: renders a compact view for a block, if there is one
  • All base props

Space between child elements. string | number

Alignment of children along the cross axis. "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch"

Alignment of children along the main axis. "start" | "end" | "flex-start" | "flex-end" | "center" | "space-around" | "space-between" | "stretch"

Horizontal overflow behavior. "visible" | "hidden" | "scroll"

Vertical overflow behavior. "visible" | "hidden" | "scroll"

Control the appearance of dividers (lines/separators), which containers render between items by default. "none" | "thin" | "medium" | "thick"

Text color. string

Text size - one of predefined sizes. "small" | "medium" | "large" | "x-large"

Horizontal text alignment. "left" | "right" | "center"

Controls how much an element will shrink relative to others (0.0 to 1.0). number

Sets the initial main size of the element before growing/shrinking. "auto" | string

Controls how much an element will grow relative to others (0.0 to 1.0). number

Sets the direction of the flex container’s main axis. "row" | "row-reverse" | "column" | "column-reverse"

Overrides the alignItems value for this specific element. "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch"

Element width (px, %, or other CSS units). string | number

Element width (px, %, or other CSS units). string | number

Background color - “auto” generates a color automatically. "auto" | string

Border width. string | number

Border corner radius. string | number

Border color - “auto” generates a color automatically. "auto" | string

Distance from the left edge. string | number

Distance from the top edge. string | number

Distance from the right edge. string | number

Distance from the bottom edge. string | number

Space inside the element between content and border. string | number

Space outside the element between border and adjacent elements. string | number

Opacity of the element and its descendants. Must be between 0.0 to 1.0. string | number