Components

Input ​

Inputs collect short freeform text and should stay visually aligned with surrounding controls.

Basic Usage ​

Use a placeholder for empty guidance and value when the control should open with an existing value.

Sizes ​

The input size scale matches adjacent buttons, selects, and other field controls so dense CP layouts still line up cleanly.

Widths ​

Inputs are full-width by default. Constrain the parent for field layouts, or set an explicit width when the input needs to be fixed.

Validation ​

Use invalid when the current value has failed validation so the field can surface its error state consistently.

Disabled ​

Disable the field when it is present for context but not currently editable.

Adornments ​

Use slot="start" / slot="end" for icons or short units inside the field border. Prefer this for a single leading/trailing glyph (search, currency). Use input groups when the adornment is a separate control (button, select) or multi-part addon.

html
<Input placeholder="Search">
  <Icon slot="start" icon="magnifying-glass"></Icon>
</Input>

API ​

Slots ​

NameDescription
label—
instructions—
hintAlias for instructions
startLeading adornment inside the field control (icon, unit, etc.)
endTrailing adornment inside the field control (icon, unit, or in-control action such as pk-copy-button)
clear-icon—

Props ​

NameDescription
autocompleteType string | undefined
autofocusType boolean
Default false
customErrorCustom validation message; also settable via setCustomValidity().
Type string | null
Default null
defaultValueType string | null
Default null
disabledDisables the control and excludes it from constraint validation.
Type boolean
Default false
fitCellFlush + fill parent cell (editable tables).
Type boolean
Default false
instructionsType string
invalidType boolean
Default false
isInvalidAlias for invalid.
labelType string
maxType number | string | undefined
maxlengthType number | undefined
minType number | string | undefined
minlengthType number | undefined
monoMonospace typography for handle, slug, and code-like values.
Type boolean
Default false
nameName submitted with form data.
Type string | null
Default null
patternType string | undefined
placeholderType string
readonlyType boolean
Default false
readOnlyAlias for readonly.
requiredMarks the control as required for form submission.
Type boolean
Default false
sizeType PkInputSize
Default default
stepType number | 'any' | undefined
typeType string
Default text
withClearType boolean
Default false
withInstructionsType boolean
Default false
withLabelType boolean
Default false

Methods ​

NameDescription
checkValidity()Runs constraint validation without showing the browser UI.
reportValidity()Runs constraint validation and shows the browser UI when invalid.
resetValidity()Clears custom errors and re-syncs validity state.
setCustomValidity(message: string)Sets or clears a custom validation message.

Events ​

NameDescription
@blur—
@change—
@focus—
@input—

Custom States ​

NameDescriptionCSS selector
disabledThe control is disabled.:state(disabled)
invalidThe control currently fails constraint validation.:state(invalid)
optionalThe control is not required.:state(optional)
requiredThe control is required.:state(required)
user-invalidInvalid after the user has interacted with the control.:state(user-invalid)
user-validValid after the user has interacted with the control.:state(user-valid)
validThe control currently passes constraint validation.:state(valid)

CSS Parts ​

NameDescriptionCSS selector
baseInput row::part(base)
clear-buttonClear button::part(clear-button)
endEnd slot container::part(end)
form-controlWrapper::part(form-control)
inputNative input::part(input)
instructionsInstructions::part(instructions)
labelLabel::part(label)
startStart slot container::part(start)
Edit this page
Last updated: Sep 15, 2026, 1:09 PM