Skip to main content

Type Alias: KeyAttributes

type KeyAttributes = ComponentPropsWithoutRef<"div"> & Record<`data-${string}`, string | number | boolean | undefined>;

Defined in: react/src/components/Piano/index.tsx:40

What PianoProps.keyProps may return for one key.

data-* attributes are spelled out because TypeScript only allows them on JSX syntax, not on an object type, and selecting on one is the usual way to mark a key out.