Components · Feedback
PaneDropOverlay
Where a dragged tab will land — the half of a pane a split will take, or the whole pane — shaded with the drop place and its words in a HUD chip.
Also called Split zone, Drop zone, Dock overlay
import { PaneDropOverlay } from "@botiverse/raft-ui/wip";PaneDropOverlay shows where a dragged tab will land, as the area the new pane will take: at a pane's edge, the half a split will take; in its middle, the whole pane. The shade is the one look for a place, DropPlaceholder, with the zone's words in a HUD chip (Tabs and panes).
When to use
Anatomy
- The overlay, laid over the zone's area (
paneDropArea), with aDropPlaceholderon the strong fill, because it lies over live content. - The words, in a HUD chip in its middle.
Behavior
paneDropZone(rect, x, y)gives the zone a point is in: the nearest edge within 25% of the whole pane's width or height (its tab bar included), elsecenter.- An edge shades that half of the pane: Split up, Split down, Split left, Split right. The middle shades the whole pane: Move to this pane. Over the conversation the app passes its own words in
label: Split right of the conversation. - With
portal(the default) it renders in the nearest portal container, elsedocument.body,fixedat the drag's layer, so it lies above pages laid over the panes from a fixed layer;rectis in client px. Without it, it isabsolutein the pane's positioned parent. - It moves between zones in 120ms with the drag's settle easing.
Content
- Say what the drop does, in the words of the tab's menu: Split right, Move to this pane. Pass translations as
messages.
Accessibility
- It is hidden from assistive technology: the drag's announcements say where the tab is (Drag and drop).
- Dragging is never the only way: Move to another pane in the tab's menu is the keyboard's path.
Rules
- Shade the area the new pane will take, never a line or an outline alone.
- Shade nothing over a place that won't take the tab.
API
PaneDropOverlay
Where a dragged tab will land, as the area the new pane will take: an edge shades that half of the pane, its tab bar included, and the middle shades the whole pane, each with its words in a HUD chip. The shade is the one look for a place, `DropPlaceholder`, on the strong fill because it lies over live content. Hidden from assistive technology: the drag's announcements say where the tab is.
Also takes the attributes of its element.