Overflow menu primitives for secondary thread list item actions in custom assistant-ui sidebars.
Anatomy
import {
ThreadListItemPrimitive,
ThreadListItemMorePrimitive
} from "@assistant-ui/react";
const ThreadListItemMore = () => (
<ThreadListItemMorePrimitive.Root>
<ThreadListItemMorePrimitive.Trigger>
More options
</ThreadListItemMorePrimitive.Trigger>
<ThreadListItemMorePrimitive.Content>
<ThreadListItemPrimitive.Archive asChild>
<ThreadListItemMorePrimitive.Item>
Archive
</ThreadListItemMorePrimitive.Item>
</ThreadListItemPrimitive.Archive>
<ThreadListItemMorePrimitive.Separator />
<ThreadListItemPrimitive.Delete asChild>
<ThreadListItemMorePrimitive.Item>
Delete
</ThreadListItemMorePrimitive.Item>
</ThreadListItemPrimitive.Delete>
</ThreadListItemMorePrimitive.Content>
</ThreadListItemMorePrimitive.Root>
);API Reference
Root
ThreadListItemMorePrimitiveRootPropsdir?: Directionopen?: booleandefaultOpen?: booleanonOpenChange?: (open: boolean) => voidmodal?: boolean
Trigger
This primitive renders a <button> element unless asChild is set.
ThreadListItemMorePrimitiveTriggerPropsasChild: boolean= falseChange the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.render?: ReactElement
Content
This primitive renders a <div> element unless asChild is set.
ThreadListItemMorePrimitiveContentPropsasChild: boolean= falseChange the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.side?: SidesideOffset?: numberalign?: AlignalignOffset?: numberarrowPadding?: numberavoidCollisions?: booleancollisionBoundary?: Boundary | Boundary[]collisionPadding?: number | Partial<Record<Side, number>>sticky?: 'partial' | 'always'hideWhenDetached?: booleanupdatePositionStrategy?: 'optimized' | 'always'onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']Event handler called when auto-focusing on close. Can be prevented.
loop?: RovingFocusGroupProps['loop']Whether keyboard navigation should loop around
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']onFocusOutside?: DismissableLayerProps['onFocusOutside']onInteractOutside?: DismissableLayerProps['onInteractOutside']forceMount?: trueUsed to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
render?: ReactElementportalProps?: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>container?: PortalProps['container']Specify a container element to portal the content into.
forceMount?: trueUsed to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
Item
This primitive renders a <div> element unless asChild is set.
ThreadListItemMorePrimitiveItemPropsdisabled?: booleanonSelect?: (event: Event) => voidasChild: boolean= falseChange the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.textValue?: stringrender?: ReactElement
Separator
This primitive renders a <div> element unless asChild is set.
ThreadListItemMorePrimitiveSeparatorPropsasChild: boolean= falseChange the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.render?: ReactElement