X Enterprises
nuxt-x-app

Note

Components for displaying, composing, and filtering user notes with attachment support.

Note

The Note category provides a complete activity/comment feed system. XANote is the individual card, XANoteFeed composes multiple notes with search and pagination, XANoteInput is the composition form, and XANoteToolbar handles search and filtering independently.

Components

<XANote />

Renders a single note as a bordered card. Displays the author's avatar (with initials fallback), name, relative and absolute timestamps, body text, and a list of clickable file attachments.

<XANote
  body="Shipped the fix to production. All tests passing."
  :timestamp="new Date()"
  :user="{ name: 'Jane Doe', avatar: '/jane.png' }"
  :attachments="[{ name: 'deploy.log', size: 14230 }]"
  size="md"
  @attachment-click="downloadFile"
>
  <template #actions>
    <UDropdownMenu :items="noteActions">
      <UButton icon="i-lucide-more-horizontal" variant="ghost" size="xs" />
    </UDropdownMenu>
  </template>
</XANote>

Props

PropTypeDefaultDescription
bodyStringrequiredNote body text
timestampString | Date | NumberrequiredCreation timestamp
userObjectrequiredAuthor: { name: string, avatar?: string }
attachmentsArray[]File attachments: [{ name, size, type?, url? }]
showActionsBooleantrueShow the #actions slot
sizeString'md'Card size variant: sm md lg

Events

EventPayloadDescription
clickEmitted when the note card is clicked
attachment-clickfileEmitted when an attachment is clicked

<XANoteFeed />

Wraps a collection of XANote cards in an animated TransitionGroup. Includes optional search/filter toolbar, a load-more button, search empty state, and a general empty state from XAStateEmpty.

<XANoteFeed
  :notes="notes"
  :has-more="hasMore"
  :loading-more="loadingMore"
  searchable
  filterable
  :filter-options="[
    { key: 'author', label: 'Author', type: 'select', options: authorOptions }
  ]"
  @load-more="loadMore"
  @note-click="openNote"
>
  <template #input>
    <XANoteInput v-model="draft" @submit="addNote" />
  </template>
  <template #note-actions="{ note }">
    <UButton icon="i-lucide-trash" size="xs" variant="ghost" color="error" @click="deleteNote(note)" />
  </template>
</XANoteFeed>

Props

PropTypeDefaultDescription
notesArrayrequiredArray of note objects
hasMoreBooleanfalseShow the load-more button
loadingMoreBooleanfalseLoading state for load-more button
loadMoreTextString'Load more notes'Load-more button label
emptyTitleString'No notes yet'Empty state title
emptyDescriptionString'Notes will appear here once added.'Empty state description
emptyIconString'i-lucide-sticky-note'Empty state icon
noteSizeString'md'Size variant passed to each XANote
showNoteActionsBooleantrueShow note action slots
searchableBooleanfalseEnable search toolbar
filterableBooleanfalseEnable filter toolbar
searchString''Current search query (v-model:search)
filtersObject{}Active filters object (v-model:filters)
filterOptionsArray[]Filter definitions: [{ key, label, type, options? }]
debounceNumber300Search debounce in ms
searchPlaceholderString'Search notes...'Search input placeholder
searchEmptyTitleString'No notes found'Search empty state title
searchEmptyDescriptionString'Try adjusting your search or filters.'Search empty state description

Events

EventPayloadDescription
load-moreUser clicked load-more
note-clicknoteUser clicked a note
attachment-click{ note, file }User clicked a note attachment
update:searchstringSearch query changed
update:filtersobjectFilters changed
clear-filtersUser cleared all filters

<XANoteInput />

Composition form for creating notes. Features an auto-resizing textarea (with Cmd+Enter / Ctrl+Enter submit shortcut), optional file attachment picker, attached file preview with removal, and a submit button with loading state.

<XANoteInput
  v-model="noteText"
  placeholder="Add a note..."
  :user="currentUser"
  allow-attachments
  accept="image/*,.pdf"
  :max-files="3"
  :loading="saving"
  submit-text="Post"
  @submit="({ body, files }) => createNote(body, files)"
/>

Props

PropTypeDefaultDescription
modelValueString''v-model for the note body
placeholderString'Add a note...'Textarea placeholder
allowAttachmentsBooleanfalseShow the file attachment button
acceptString'*'Accepted file MIME types
maxFileSizeNumber262144000Max file size in bytes (250 MB default)
maxFilesNumber5Maximum number of attachments
loadingBooleanfalseLoading state on submit button
disabledBooleanfalseDisable the entire input
submitTextString'Add note'Submit button label
userObjectnullCurrent user for avatar display: { name, avatar? }
minRowsNumber2Minimum textarea rows
maxRowsNumber6Maximum textarea rows (auto-grow limit)

Events

EventPayloadDescription
submit{ body: string, files: File[] }Emitted on button click or keyboard shortcut
update:modelValuestringTextarea content changed

<XANoteToolbar />

Search input and collapsible filter panel for note lists. Displays active filter chips with individual removal controls. Can be used standalone or is automatically embedded by XANoteFeed.

<XANoteToolbar
  v-model:search="search"
  v-model:filters="filters"
  searchable
  filterable
  search-placeholder="Search activity..."
  :filter-options="[
    { key: 'from', label: 'From', type: 'date' },
    { key: 'author', label: 'Author', type: 'select', options: authors }
  ]"
  @clear="clearAll"
/>

Props

PropTypeDefaultDescription
searchString''Current search query (v-model:search)
filtersObject{}Active filters (v-model:filters)
searchableBooleantrueShow search input
filterableBooleantrueShow filter toggle button
debounceNumber300Search debounce in ms
searchPlaceholderString'Search notes...'Search input placeholder
filterOptionsArray[]Filter definitions: [{ key, label, type, options?, placeholder? }]

Events

EventPayloadDescription
update:searchstringSearch query changed
update:filtersobjectFilters changed
clearAll filters cleared

AI Context

category: Note
package: "@xenterprises/nuxt-x-app"
use-when: >
  Use this category for activity feeds, comment threads, internal notes,
  or audit trails on entity detail pages. Compose XANoteInput + XANoteFeed
  together for a full create-and-read experience. Use XANote standalone
  when you need to render a single note in a custom layout. XANoteToolbar
  can be used independently if you need search/filter UI above a non-note
  list.
Copyright © 2026