page DragAndDropcomponent { seo { title = "DragAndDrop component" description = "Theme-aware, responsive drag and drop component." } view {
W WRNexusJS
integrations component

DragAndDrop

Theme-aware, responsive drag and drop component.

@wrnexus/ui 0.5.07 props1 slots6 events

Usage

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

<DragAndDrop
  size="default"
  color="primary"
  title="Drag And Drop"
  description="description"
  items="[]"
/>

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

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
titlestringOptional"Drag And Drop"
descriptionstringOptional""
itemsstringOptional[]
variantstringOptional"default"
classstringOptional""

Slots

  • default

Events

  • dragStart
  • dragEnd
  • dragEnter
  • dragLeave
  • drop
  • change

Source contract

Installed source: components/DragAndDrop.wrn

component DragAndDrop {
  props {
    @event dragStart = function
    @event dragEnd = function
    @event dragEnter = function
    @event dragLeave = function
    @event drop = function
    @event change = function
    size = "default"
    color = "primary"
    title = "Drag And Drop"
    description = ""
    items = []
    variant = "default"
    class = ""
  }
  view {
        <section class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--drag-and-drop 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>
    }
}
} }