Skip to content

DisplayValueComponent

Official

A read-only display value for a setting row: a value label and an optional status indicator. On a navigable row, it surfaces the value edited on the page the row opens, so the user can see it without opening that page.

Import:

import { DisplayValueComponent } from 'obsidian';

Signature:

export class DisplayValueComponent

Constructor

new DisplayValueComponent(containerEl: HTMLElement)

Constructor.

To get the constructor instance, use getDisplayValueComponentConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
valueElHTMLElementThe HTML element that holds the value label.

Methods

MethodReturnsDescription
setStatus(status)thisShow a status indicator on the row. Use 'warning' when the value needs the user's attention; the explanation itself belongs on the page this row leads to, while this only signals that there is something to look at.
setValue(value)thisSet the value label text.

Links to this page: