Skip to main content
.monospaced(isActive?: boolean): Component;

Parameters

isActive
boolean
default:"true"
Whether to apply monospaced font styling. Defaults to true if not specified.

Support

Usage

Monospaced text

Text("Code text")
    .monospaced()

Conditional monospaced

Text("Maybe monospaced")
    .monospaced(isCodeBlock)

Explicitly not monospaced

Text("Regular font text")
    .monospaced(false)