Theme studio

Design a theme, preview it live, then export it. Saved in this browser.

Quick picks #10b981
Generated scale
50100200300400500600700800900
Some text is below AA

DropIndicator

  • Stable
  • WCAG 2.2 evidence
  • RTL

Insertion line shown between two items while something is dragged over a GridList or ListBox. Render it from the renderDropIndicator option of useDragAndDrop; SortableList and BoardColumn already do. Built on React Aria DropIndicator: the row carries data-drop-target while it is the active target and data-insert-position (before, after, on or root) from its target. During a keyboard drag React Aria renders one indicator per position with a visually hidden, labelled drop button ("Insert between A and B"), so screen reader and keyboard users can choose the position (WCAG 2.1.1, 4.1.2); only the active target shows the line. The visual is decorative (aria-hidden) and is drawn with borders so it survives forced colours.

import { DropIndicator } from "@nexera-ui/react";
Loading example…
3
examples
3
props
0
live controls
1
platform
6
WCAG criteria
0
blocks use it

Try every prop. Copy the code.

Change the props and the code updates. Check light and dark, LTR and RTL, and phone width.

Loading…
Generated code
import { DropIndicator } from "@nexera-ui/react";

<DropIndicator />

Examples 2

The same examples as Storybook, rendered live. Open Code to copy one.

In sortable list

Drag a row (or press Enter on its handle and use the arrow keys) to see the indicator at each insertion point.

Loading example…

In kanban board

Drag a card within or across columns; Move to column in the card's menu does the same without dragging (WCAG 2.5.7).

Loading example…

Props 3

3 props shown

classNameNexera
string

Extra classes, merged last so they win over the defaults.

Default –
styleNexera
CSSProperties

Inline style.

Default –
target*React Aria
DropTarget

The drop target that the drop indicator represents.

Default –

* Required. React Aria props shown are the ones most apps use; the component accepts the rest of its React Aria props too.

Accessible by default.

Built on React Aria, and covered by the WCAG 2.2 evidence generated on every build.

WCAG 2.2 evidence

5 direct · 1 supporting
  • 1.1.1Non-text ContentLevel A · tested directly
  • 1.3.1Info and RelationshipsLevel A · tested directly
  • 1.4.11Non-text ContrastLevel AA · supporting test
  • 2.1.1KeyboardLevel A · tested directly
  • 2.5.7Dragging MovementsLevel AA · tested directly
  • 4.1.2Name, Role, ValueLevel A · tested directly

Fits any width.

Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.

0 px · drag the corner

Styling hooks

Pass className to add Tailwind classes (merged last). State is exposed as data attributes, so you can style it with variants like data-pressed:.

Usage
<DropIndicator className="shadow-sm" />

Used in blocks

No block uses DropIndicator yet.

Related components