UNPKG

@mitcsutt/kiln-dnd

Version:

Kiln drag and drop: sortable lists, boards, drop zones and grid layouts with one keyboard model and one announcer, rendered through kiln-ui

19 lines (18 loc) • 980 B
import { type IconButtonProps } from '@mitcsutt/kiln-ui'; export interface DragHandleProps extends Omit<IconButtonProps, 'label' | 'icon'> { /** The accessible name. Default "Move" and the item's label, from `announcements.handle`. */ label?: string; } /** * The grip a draggable item is picked up by. * * @remarks * Put `DragHandle` inside a `Sortable` or `Board` item rendered with `handle`, inside a * `GridLayout.Item` (which always drags by a handle) or inside a `Draggable` with * `handle`. It's a small `IconButton` named after the item ("Move Revenue") that points * to the scope's keyboard instructions, so a screen reader says how to use it. * * Use a handle whenever the item holds its own links, buttons or fields: clicks and keys * inside the item then stay theirs, and only the handle starts a drag. */ export declare const DragHandle: import("react").ForwardRefExoticComponent<DragHandleProps & import("react").RefAttributes<HTMLButtonElement>>;