MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TagGroup

Function TagGroup

starters/tailwind/src/TagGroup.tsx:74–99  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  items,
  children,
  renderEmptyState,
  ...props
}: TagGroupProps<T>)

Source from the content-addressed store, hash-verified

72}
73
74export function TagGroup<T>({
75 label,
76 description,
77 errorMessage,
78 items,
79 children,
80 renderEmptyState,
81 ...props
82}: TagGroupProps<T>) {
83 return (
84 <AriaTagGroup {...props} className={twMerge('flex flex-col gap-2 font-sans', props.className)}>
85 <Label>{label}</Label>
86 <ColorContext.Provider value={props.color || 'gray'}>
87 <TagList items={items} renderEmptyState={renderEmptyState} className="flex flex-wrap gap-1">
88 {children}
89 </TagList>
90 </ColorContext.Provider>
91 {description && <Description>{description}</Description>}
92 {errorMessage && (
93 <Text slot="errorMessage" className="text-sm text-red-600">
94 {errorMessage}
95 </Text>
96 )}
97 </AriaTagGroup>
98 );
99}
100
101const removeButtonStyles = tv({
102 extend: focusRing,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected