-
I am building a two columns list of products (image + text). It can be selected and then the selected shows additionally in a panel above. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
It would be easier to guess with a design or codesandbox. But it looks like a listbox to me: const state = useCompositeState({ orientation: "vertical" });
<Composite {...state} as="ul" role="listbox" aria-label="Products" style={{ columnCount: 2 }}>
<CompositeItem {...state} as="li" role="option" onFocus={...} onClick={...}>Item</CompositeItem>
<CompositeItem {...state} as="li" role="option" onFocus={...} onClick={...}>Item</CompositeItem>
<CompositeItem {...state} as="li" role="option" onFocus={...} onClick={...}>Item</CompositeItem>
<CompositeItem {...state} as="li" role="option" onFocus={...} onClick={...}>Item</CompositeItem>
<CompositeItem {...state} as="li" role="option" onFocus={...} onClick={...}>Item</CompositeItem>
</Composite> Or just a list of tabbable items is fine too. |
Beta Was this translation helpful? Give feedback.
-
And for this one, what would be the best: |
Beta Was this translation helpful? Give feedback.
It would be easier to guess with a design or codesandbox. But it looks like a listbox to me: