Skip to content

KInput

Basic Input

With Prefix & Suffix

⌘K

Error State

Please enter a valid email address.

Disabled State

Text input component with v-model binding, type support, error state, and prefix/suffix slots.

Props

NameTypeDefaultDescription
typestring'text'Native HTML input type (e.g. 'text', 'number', 'password').
modelValuestring | number''Bound value via v-model.
placeholderstring''Placeholder text.
disabledbooleanfalseWhether the input is disabled.
errorbooleanfalseWhether to show error styling (destructive border).

Emits

NameParametersDescription
update:modelValue(value: string | number)Emitted when the input value changes.

Slots

NameDescription
prefixContent placed before the input (e.g. icons, prefixes).
suffixContent placed after the input (e.g. icons, suffixes).

Basic Usage

vue
<script setup>
import { ref } from 'vue'
import { KInput } from '@kK-2004/ui-component'

const value = ref('')
</script>

<template>
  <KInput v-model="value" placeholder="Enter text..." />
</template>