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

Property Type Description
valueEl HTMLElement The HTML element that holds the value label.

Methods

Method Returns Description
setStatus(status) this Show 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) this Set the value label text.

Links to this page: