AdminLTE Vue ships a small set of form controls that wrap Bootstrap 5.3 markup with v-model support, optional labels, validation feedback and consistent sizing. The components are LteInput, LteSelect, LteTextarea, LteInputSwitch and LteButton. Every control forwards unknown attributes to the underlying element, so native attributes like name, autocomplete or maxlength work as expected.
A labelled text input that supports input-group prepend/append addons and inline validation.
<script setup lang="ts">
import { ref } from 'vue'
const email = ref('')
const amount = ref('')
</script>
<template>
<LteInput v-model="email" label="Email" type="email" placeholder="[email protected]" required />
<LteInput
v-model="amount"
label="Amount"
prepend="$"
append=".00"
group-size="lg"
/>
<LteInput v-model="email" label="Email" error="This field is required." />
</template>
When prepend, append or error is set, the input is wrapped in a Bootstrap input-group. The error string renders as .invalid-feedback and applies is-invalid to the field. The default slot renders below the field (useful for help text).
| Name | Type | Default | Description |
|---|
modelValue | string | number | — | Bound value (v-model). |
label | string | — | Label text rendered above the input. |
type | string | 'text' | Native input type. |
id | string | auto | Input id; auto-generated via useId() when omitted. |
placeholder | string | — | Placeholder text. |
error | string | — | Validation message; adds is-invalid and renders feedback. |
fgroupClass | string | — | Extra classes on the wrapping .mb-3 div. |
groupSize | 'sm' | 'lg' | — | Sizing for the input-group (only when an addon/error is present). |
prepend | string | — | Text addon before the input. |
append | string | — | Text addon after the input. |
disabled | boolean | false | Disables the input. |
required | boolean | false | Marks the input as required. |
| Name | Payload | Description |
|---|
update:modelValue | string | Fired on input for v-model. |
| Name | Description |
|---|
| default | Rendered below the field, inside the wrapper. |
A labelled form-select supporting single or multiple selection. Options can come from the options prop or the default slot.
<script setup lang="ts">
import { ref } from 'vue'
const country = ref('us')
const tags = ref<string[]>([])
const countries = [
{ value: 'us', label: 'United States' },
{ value: 'lv', label: 'Latvia' },
]
</script>
<template>
<LteSelect v-model="country" label="Country" :options="countries" />
<LteSelect v-model="tags" label="Tags" multiple :options="countries" />
<!-- Custom options via the default slot -->
<LteSelect v-model="country" label="Country">
<option value="us">United States</option>
<option value="lv">Latvia</option>
</LteSelect>
</template>
With multiple, modelValue is an array of the selected option values.
| Name | Type | Default | Description |
|---|
modelValue | string | number | Array<string | number> | — | Bound value (v-model). Array when multiple. |
label | string | — | Label text rendered above the select. |
id | string | auto | Select id; auto-generated when omitted. |
options | { value: string | number; label: string }[] | [] | Options to render when the slot is empty. |
error | string | — | Validation message; adds is-invalid and renders feedback. |
fgroupClass | string | — | Extra classes on the wrapping .mb-3 div. |
multiple | boolean | false | Enables multi-select; emits an array value. |
disabled | boolean | false | Disables the select. |
| Name | Payload | Description |
|---|
update:modelValue | string | number | Array<string | number> | Fired on change; array when multiple. |
| Name | Description |
|---|
| default | Replaces the auto-rendered <option> list. |
A labelled multi-line text control.
<script setup lang="ts">
import { ref } from 'vue'
const bio = ref('')
</script>
<template>
<LteTextarea v-model="bio" label="Bio" :rows="6" placeholder="Tell us about yourself" />
</template>
| Name | Type | Default | Description |
|---|
modelValue | string | — | Bound value (v-model). |
label | string | — | Label text rendered above the textarea. |
id | string | auto | Textarea id; auto-generated when omitted. |
rows | number | 4 | Number of visible text rows. |
placeholder | string | — | Placeholder text. |
error | string | — | Validation message; adds is-invalid and renders feedback. |
fgroupClass | string | — | Extra classes on the wrapping .mb-3 div. |
disabled | boolean | false | Disables the textarea. |
| Name | Payload | Description |
|---|
update:modelValue | string | Fired on input for v-model. |
A Bootstrap switch (form-switch) bound to a boolean.
<script setup lang="ts">
import { ref } from 'vue'
const notifications = ref(true)
</script>
<template>
<LteInputSwitch v-model="notifications" label="Email notifications" />
</template>
| Name | Type | Default | Description |
|---|
modelValue | boolean | — | Checked state (v-model). |
label | string | — | Label text rendered beside the switch. |
id | string | auto | Input id; auto-generated when omitted. |
theme | BootstrapTheme | — | Bootstrap color variant. |
disabled | boolean | false | Disables the switch. |
| Name | Payload | Description |
|---|
update:modelValue | boolean | Fired on change with the new checked state. |
A themed Bootstrap button with optional icon and block layout.
<template>
<LteButton theme="primary" label="Save" />
<LteButton theme="danger" outline icon="trash" label="Delete" />
<LteButton type="submit" theme="success" size="lg" block>
Submit
</LteButton>
</template>
The icon value is passed through the biClass() helper (Bootstrap Icons). When a label or default slot is present, the icon gets a trailing me-1 margin. The default slot overrides the label prop.
| Name | Type | Default | Description |
|---|
type | 'button' | 'submit' | 'reset' | 'button' | Native button type. |
theme | BootstrapTheme | 'primary' | Bootstrap color variant. |
outline | boolean | false | Renders the outline (btn-outline-*) style. |
size | 'sm' | 'lg' | — | Button size. |
icon | string | — | Bootstrap Icon name, resolved via biClass(). |
label | string | — | Button text (overridden by the default slot). |
block | boolean | false | Full-width button (w-100). |
| Name | Description |
|---|
| default | Button content; overrides label. |