react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

[RAC] Add `orientation` prop to `GridList`

Open Niznikr opened this issue 1 year ago โ€ข 1 comments
trafficstars

Provide a general summary of the feature here

Thanks for the work on https://github.com/adobe/react-spectrum/pull/6486. I think an orientation prop similar to ListBox would still be useful in GridList to allow horizontal arrow keys for drag-n-drop. We have items arranged horizontally in our case but can't use ListBox as the items contain interactive elements.

๐Ÿค” Expected Behavior?

An orientation prop is available in GridList to allow horizontal arrow keys for drag-n-drop.

๐Ÿ˜ฏ Current Behavior

Vertical arrow keys are the only option for drag-n-drop in GridList.

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

We have items arranged horizontally in our GridList as we can't use ListBox because the items contain interactive elements.

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

Niznikr avatar Aug 21 '24 20:08 Niznikr

Thanks for the issue. We could consider this, though it's not currently a priority for us. We'd review a contribution.

snowystinger avatar Aug 21 '24 22:08 snowystinger

I would like to see the orientation prop, but really I'd like for the grid pattern to be fully implemented so 2 dimensions can be used ๐Ÿ˜„

https://www.w3.org/WAI/ARIA/apg/patterns/grid/#layoutgridsforgroupingwidgets https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/layout-grids/

onx2 avatar Nov 17 '25 13:11 onx2

You can set layout="grid" as a prop.

devongovett avatar Nov 17 '25 17:11 devongovett