Skip to content

Collapsible: a prop to group collapsibles similar to 'name' #5107

@Yves852

Description

@Yves852

Package

v4.x

Description

Similare to the tag details, ability to add a prop "name" (or other) to connect collapsibles with only one open at a time. "The name attribute specifies a group name".

The use case is similar to UAccordion but adding name to Ucollapsible offers a new level of flexibility that UAccordion doesn't as this one relies specifically to the prop items which is a limitation.

Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details#name

Example:

<UCollapsible name="group">
  <h2>Foo<h2>

  <template #content>
    Foo content
  </template>
</UCollapsible>

<img src="...">

<UCollapsible name="group">
  <h2>Bar<h2>

  <template #content>
    Bar content
  </template>
</UCollapsible>

<img src="...">

<UCollapsible name="group">
  <h2>Baz<h2>

  <template #content>
    Baz content
  </template>
</UCollapsible>

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions