Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

FormattedValueInput

Formatted Value Input using the host's formatted numeric editing presentation.

Import

import { FormattedValueInput } from "@dartwic/interface-sdk/ui";

Declaration

export const FormattedValueInput: HostComponent<FormattedValueInputProps>;

FormattedValueInputProps

Numeric value editor selected by a Units formatting directive.

export interface FormattedValueInputProps extends HostComponentProps {
    value: number;
    units?: string;
    label?: string;
    submitLabel?: string;
    disabled?: boolean;
    onCommit: (value: number) => unknown;
    onCancel?: () => void;
    trailingAction?: HostNode;
    compact?: boolean;
}
PropTypeRequirementDescription
valuenumberRequired
unitsstringOptional
labelstringOptional
submitLabelstringOptional
disabledbooleanOptional
onCommit(value: number) => unknownRequired
onCancel() => voidOptional
trailingActionHostNodeOptional
compactbooleanOptional
classNamestringOptionalAdditional Tailwind or host CSS classes.
childrenHostNodeOptionalChild content rendered by the host component.
idstringOptionalOptional DOM identifier.
styleRecord<string, unknown>OptionalInline style values passed to the host component.