Skip to content

Selectable #768

Answered by diegohaz
lishine asked this question in Questions
Oct 18, 2020 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

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" o…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@lishine
Comment options

@diegohaz
Comment options

@prbxr
Comment options

@diegohaz
Comment options

@prbxr
Comment options

Answer selected by diegohaz
Comment options

You must be logged in to vote
2 replies
@diegohaz
Comment options

@lishine
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants