Clarify Chip and Label use case
See original GitHub issueDescribe the issue. What is the expected and unexpected behavior?
Seeking clarity on when to use the Chip
and Label
components. In the chip documentation, “Chips are used to communicate a value, a tag, or a set of attribute-value pairs within workflows that involve filtering or tagging a set of objects.” From what I can glean, that appears to be the only contextual distinction between a chip and label. That application satisfies most of our use cases, except for when we need a chip that triggers actions such as navigation.
Our stopgap solution for chip navigation is to wrap the Label
component with React Router’s Link component. This creates a new issue where we lose the ability to hide/show and categorize these elements, which leaves us with two options: Create a custom Label Group
component or create a custom navigation Chip
.
We’re looking for an element that could be used within an input, filter, and used as an action item. More essential features include:
- Displays text and icon content
- Read-only
- Closable
- Linkable
- Expand/Collapsible
- Categorizable
Mockup for more context
- Within this context, is it appropriate to use the
Chip Group
toolbar when categorizing Credential tags? - Clicking the blue Inventory tag should trigger navigation. Same for the Credential Machine and Cloud tags. Is it possible to create a chip variant that can navigate or trigger other contextual actions?
- None of the above is a “filtered” or “selected” item. If we can’t use a
Chip
, what do we use instead? - Would it be better to expand the Chip use case? Or possibly merge the Chip and Label components which users can then configure through variants?
Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around? Enhancement
Related PF-React Issue: https://github.com/patternfly/patternfly-react/issues/3829 Related PF-Core Issue: https://github.com/patternfly/patternfly/issues/1837
What is your product and what release version are you targeting? Tower
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Does sometime within the next 6 months sound reasonable? We could use
Label
without overflow and grouping behavior in our detail views untilLabel Group
lands.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.