Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

Input

Input using the host's text and native input fields presentation.

Import

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

Declaration

export const Input: HostComponent<InputProps>;

InputProps

Props accepted by the standard host input.

export interface InputProps extends HostComponentProps {
    /** Controlled input value. */
    value?: string | number;
    /** Initial uncontrolled value. */
    defaultValue?: string | number;
    /** Change event handler. */
    onChange?: HostEventHandler;
    /** Placeholder text shown while empty. */
    placeholder?: string;
    /** Native input type. */
    type?: string;
    /** Disables interaction. */
    disabled?: boolean;
}
PropTypeRequirementDescription
valuestring | numberOptionalControlled input value.
defaultValuestring | numberOptionalInitial uncontrolled value.
onChangeHostEventHandlerOptionalChange event handler.
placeholderstringOptionalPlaceholder text shown while empty.
typestringOptionalNative input type.
disabledbooleanOptionalDisables interaction.
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.