Skip to content

toPx

Converts a number to a string with ‘px’ appended.

Import:

import { toPx } from 'obsidian-dev-utils/html-element';

Signature:

function toPx(value: number): string

Parameters:

ParameterTypeDescription
valuenumberThe number to convert.

Returns: string — The number as a string with ‘px’ appended.