Skip to content

New pattern proposal: reveal/collapse elements #1139

@gforcada

Description

@gforcada

The idea

I have a list of say tags of a document, but there are way too many, applying this pattern, given a data-reveal-amount number, that number of tags are shown, the others are hidden behind a button that reveals them 🎉

Extra nice would be if elements are sorted given a data-reveal-key that is sortable within the elements of the list.

This way, if each tag has a relevance number, the most relevant could be sorted, so by automatically hiding the other elements, the most relevant tags would be shown.

Implementation

Is there any pattern that provides this functionality? I could not find any, the sortable allows manual sorting, not automatic sorting, AFAIU

Are there guidelines on how to create a new pattern and submit it? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions