page FileUploadcomponent { seo { title = "FileUpload component" description = "Theme-aware, responsive file upload component." } view {
W WRNexusJS
integrations component

FileUpload

Theme-aware, responsive file upload component.

@wrnexus/ui 0.5.07 props1 slots7 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<FileUpload
  size="default"
  color="primary"
  title="File Upload"
  description="description"
  items="[]"
/>

Legacy mount name: data-component="FileUpload".

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
titlestringOptional"File Upload"
descriptionstringOptional""
itemsstringOptional[]
variantstringOptional"default"
classstringOptional""

Slots

  • default

Events

  • select
  • upload
  • progress
  • success
  • error
  • cancel
  • remove

Source contract

Installed source: components/FileUpload.wrn

component FileUpload {
  props {
    @event select = function
    @event upload = function
    @event progress = function
    @event success = function
    @event error = function
    @event cancel = function
    @event remove = function
    size = "default"
    color = "primary"
    title = "File Upload"
    description = ""
    items = []
    variant = "default"
    class = ""
  }
  view {
        <section class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--file-upload wire-next--variant-{variant} {class}">
      {#if title}<strong>{title}</strong>{/if}
      {#if description}<p>{description}</p>{/if}
      {#if items}<div class="wire-next__items">{#each items as item}<span>{item.label}</span>{/each}</div>{/if}
      <slot />
        </section>
    }
}
} }