Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item component #7958

Open
rolfsmeds opened this issue Oct 9, 2024 · 2 comments
Open

Item component #7958

rolfsmeds opened this issue Oct 9, 2024 · 2 comments
Labels
component-idea enhancement New feature or request

Comments

@rolfsmeds
Copy link
Contributor

A component for creating the types of multi-text items typical in lists etc.

  • Primary text (also supports slotting elements)
  • Secondary text (configurable to be above or below primary text; also supports slotting elements)
  • Prefix slot (e.g. for avatar or icon)
  • Suffix slot (e.g. for a button or icon)

Example of Item with secondary text below, avatar prefix and button/icon in suffix:
Image

DOM / semantic structure:

  • Item root (generic role)
    • slot="prefix"
    • span : primary text
      • slot="primary-content"
    • span : secondary text
      • slot="secondary-content"
    • slot="suffix"

(Note that, although this component will typically be used in lists, it does not have list semantics on its own by default, as many other use cases are equally valid and useful. When used as list item, either apply role="listitem" manually or wrap in one.)

Open questions

Name: vaadin-item is already taken.

@rolfsmeds rolfsmeds added enhancement New feature or request component-idea labels Oct 9, 2024
@knoobie
Copy link
Contributor

knoobie commented Oct 9, 2024

How about vaadin-list-item like the corresponding "LI" stands for list item? :)

@web-padawan
Copy link
Member

See also #459 where prefix / suffix slots for item were originally discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-idea enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants