Widget components

Cards, boxes, timeline, direct chat, progress, callouts and more.

Widgets are the building blocks of an AdminLTE dashboard body — cards, stat boxes, timelines and chat panels. They are auto-registered by the Nuxt module (and by app.use(AdminLte) in plain Vue), so you can use them without imports. Every widget styles itself from the prebuilt AdminLTE CSS; you only pass props and slots. Colors use the shared BootstrapTheme union: primary, secondary, success, info, warning, danger, light, dark.

This page covers the main widgets. Other widgets also ship in the library (see the components overview) — the API tables below reflect the real component source.

LteCard

The general-purpose container. Renders a .card with an optional header (driven by title/icon or the #header slot), an optional footer slot, and built-in collapse / maximize / remove tools. The theme + variant combination controls the color treatment; gradient adds bg-gradient.

<template>
  <LteCard title="Monthly recap" icon="bi-graph-up" theme="primary" variant="outline" collapsible>
    <p>Card body content.</p>
    <template #footer>Updated just now</template>
  </LteCard>
</template>

Use the #header slot to fully replace the default header (title + tools):

<LteCard>
  <template #header>
    <h3 class="card-title">Custom header</h3>
  </template>
  Body
</LteCard>

Props

NameTypeDefaultDescription
titlestringHeader title text (rendered inside .card-title).
iconstringBootstrap Icons class shown before the title.
themeBootstrapThemeColor theme; enables the colored treatments.
variant'default' | 'outline' | 'solid''default'default colored header, outline colored top border, solid fully colored card.
gradientbooleanfalseAdds bg-gradient (most visible with variant: 'solid').
collapsiblebooleanfalseShow the collapse/expand tool button.
defaultCollapsedbooleanfalseStart collapsed.
removablebooleanfalseShow the remove tool button.
maximizablebooleanfalseShow the maximize tool button.
bodyClassstringExtra classes on .card-body.
headerClassstringExtra classes on .card-header.
footerClassstringExtra classes on .card-footer.

Slots

NameDescription
defaultCard body content.
headerReplaces the entire header (title + tools).
titleReplaces only the title content.
toolsExtra tool buttons, rendered before the built-in tools.
footerFooter content; the footer only renders when this slot is used.

LteSmallBox

A colored stat box with a big number, label, icon and an optional footer link. The whole box is tinted with text-bg-{theme}.

<LteSmallBox
  :title="150"
  text="New orders"
  icon="bi-bag"
  theme="success"
  url="/orders"
  url-text="View orders"
/>

Props

NameTypeDefaultDescription
titlestring | numberThe large headline value.
textstringThe label under the value.
iconstringBootstrap Icons class for the corner icon.
themeBootstrapTheme'primary'Background color of the box.
urlstringFooter link href; the footer only renders when set.
urlTextstring'More info'Footer link label.
loadingbooleanfalseShows a spinner overlay.

Slots

NameDescription
titleReplaces the headline value.
defaultReplaces the label text.
iconReplaces the corner icon.

LteInfoBox

A horizontal stat box: a colored icon chip plus a text label, number and optional progress bar.

<LteInfoBox
  text="Bookmarks"
  :title="41410"
  icon="bi-bookmark"
  theme="info"
  :progress="70"
  progress-text="70% increase in 30 days"
/>

Props

NameTypeDefaultDescription
titlestring | numberThe number value (rendered when not null).
textstringThe label above the number.
iconstringBootstrap Icons class for the icon chip.
themeBootstrapTheme'info'Box / icon / progress color.
iconThemeBootstrapThemeOverride the icon chip color (default variant only).
variant'default' | 'solid''default'default white box with a colored chip; solid colors the whole box.
gradientbooleanfalseAdds bg-gradient (only meaningful with variant="solid").
boxClassstringExtra classes on the .info-box root.
unitstringSmall unit rendered after the number, e.g. %.
progressnumberProgress percentage (0–100); renders a bar when set.
progressTextstringCaption under the progress bar.

The default slot renders inside .info-box-content (after the number) for custom content.

LteTimeline

Renders a vertical timeline from an array of items. Each item's body and footer are inserted as HTML (v-html).

<script setup lang="ts">
import type { TimelineItem } from 'adminlte-vue'

const items: TimelineItem[] = [
  { time: '12:05', icon: 'bi-envelope', iconTheme: 'primary', title: 'New message', body: 'You have a new message.' },
  { time: '5 mins ago', icon: 'bi-person', iconTheme: 'success', title: 'New user registered' },
]
</script>

<template>
  <LteTimeline :items="items" />
</template>

Props

NameTypeDefaultDescription
itemsTimelineItem[]The timeline entries (required).

TimelineItem

FieldTypeDescription
timestringTimestamp label shown in the header.
titlestringEntry heading.
iconstringBootstrap Icons class (defaults to bi-circle-fill).
iconThemeBootstrapThemeIcon background color (defaults to primary).
bodystringBody markup, inserted as HTML.
footerstringFooter markup, inserted as HTML.
urlstringWraps the title in a link.

LteDirectChat

A chat card with a messages pane and a sliding contacts panel toggled by the header button.

<script setup lang="ts">
import type { DirectChatMessage, DirectChatContact } from 'adminlte-vue'

const messages: DirectChatMessage[] = [
  { from: 'Alex', image: '/avatar.png', timestamp: '23 Jan 2:00 pm', text: 'Hey!' },
  { from: 'You', image: '/me.png', timestamp: '23 Jan 2:05 pm', text: 'Hi there', isOwn: true },
]
const contacts: DirectChatContact[] = [
  { name: 'Count Dracula', image: '/d.png', date: '1/28/2022', preview: 'How have you been?' },
]
</script>

<template>
  <LteDirectChat title="Direct chat" theme="primary" :messages="messages" :contacts="contacts" />
</template>

Props

NameTypeDefaultDescription
titlestringCard header title.
themeBootstrapTheme'primary'Chat accent color (direct-chat-{theme}).
messagesDirectChatMessage[][]Messages to render in the default messages markup.
contactsDirectChatContact[][]Contacts to render in the contacts panel.

Slots

NameDescription
messagesReplaces the default messages list.
contactsReplaces the default contacts list.
footerFooter content; renders only when used (e.g. a message input).

DirectChatMessage

FieldTypeDescription
fromstringSender name.
imagestringAvatar URL.
timestampstringDisplayed time.
textstringMessage body.
isOwnbooleanAligns the message to the end (the current user).

DirectChatContact

FieldTypeDescription
namestringContact name.
imagestringAvatar URL.
datestringLast-activity date.
previewstringLast-message preview text.

LteCallout

A bordered, themed note block. Pass body content via the default slot.

<LteCallout theme="warning" title="Follow the steps">
  Make sure you complete the setup before continuing.
</LteCallout>

Props

NameTypeDefaultDescription
themeBootstrapTheme'info'Callout color (callout-{theme}).
titlestringOptional heading (h5).

LteAlert

A Bootstrap alert with an optional icon, title and dismiss button. Supports both controlled (v-model:show) and uncontrolled usage.

<template>
  <LteAlert theme="success" icon="bi-check-circle" title="Saved!" dismissible>
    Your changes were stored.
  </LteAlert>

  <!-- Controlled -->
  <LteAlert v-model:show="visible" theme="danger" dismissible @dismissed="onDismiss">
    Something went wrong.
  </LteAlert>
</template>

Props

NameTypeDefaultDescription
themeBootstrapTheme'info'Alert color (alert-{theme}).
iconstringBootstrap Icons class shown in the heading.
titlestringHeading text.
dismissiblebooleanfalseAdds a close button.
showbooleantrueVisibility (use with v-model:show).

Emits

NamePayloadDescription
update:showbooleanFired on dismiss (enables v-model:show).
dismissedFired when the alert is dismissed.

LteProgress

A progress bar with theming, sizing, striped/animated options and an optional percentage label.

<LteProgress :value="60" theme="success" striped animated show-label />

Props

NameTypeDefaultDescription
valuenumberCurrent value (required).
maxnumber100Maximum value; the bar width is value / max.
themeBootstrapTheme'primary'Bar color (bg-{theme}).
sizeComponentSize'sm' or 'lg' track height.
stripedbooleanfalseAdds the striped style.
animatedbooleanfalseAnimates the stripes.
showLabelbooleanfalseRenders the rounded percentage inside the bar.
heightstringCustom track height (CSS value).