X Enterprises
User

UserItem

Flat list row for users, companies, or businesses with avatar/icon, subtitle, badge, and actions slot.

User

The User category provides a set of composable components for displaying user identity. XAUserCard and XAUserItem cover card and list-row contexts. XAUserMenu handles the navigation header avatar + dropdown pattern. XAUserRoleBadge renders role strings as colored badges with automatic color mapping. XAUser is a drop-in alias for XAUserCard.

Components

<XAUserItem />

A flat list row suitable for displaying users, companies, or businesses inside menus, dropdowns, or list panels. Companies and businesses render a building/store icon instead of an avatar. Supports a badge next to the name, a description line, and a chevron for navigable items.

<!-- User -->
<XAUserItem name="John Doe" email="john@example.com" status="online" />

<!-- Company -->
<XAUserItem type="company" name="Acme Inc" subtitle="Technology" />

<!-- Business -->
<XAUserItem type="business" name="Local Coffee Shop" subtitle="123 Main St" />

<!-- Clickable with actions slot -->
<XAUserItem name="Jane" clickable @click="open">
  <template #actions>
    <UButton size="xs" icon="i-lucide-mail" variant="ghost" />
  </template>
</XAUserItem>

Props

PropTypeDefaultDescription
nameStringrequiredDisplay name.
typeString'user'Entity type — 'user', 'company', or 'business'.
avatarString''Avatar image URL (users only).
emailString''Email shown as subtitle when no explicit subtitle is set.
roleString''Role shown as subtitle when no subtitle or email is set.
subtitleString''Custom subtitle — overrides email and role.
descriptionString''Second line of detail text.
statusString''Online status dot — 'online', 'offline', 'away', or 'busy' (users only).
badgeString | ObjectnullBadge next to the name. Object form: { label, color, variant }.
sizeString'md'Row size — 'sm', 'md', or 'lg'.
clickableBooleanfalseAdds hover background and emits click.
selectedBooleanfalseApplies primary highlight background.
showChevronBooleantrueShows a right-chevron when clickable is true and no actions slot is provided.

Events

EventDescription
clickEmitted when the row is clicked (requires clickable).

AI Context

component: XAUserItem
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
category: User
use-when: Rendering a flat list row for users, companies, or businesses inside menus, dropdowns, or list panels. Companies and businesses render an icon instead of an avatar. Supports badge, subtitle, description, status, and an actions slot.
entity-types: [user, company, business]
Copyright © 2026