Skip to content
Latestv1.0.63

AiActionGroup ​

AiActionGroup is a collection of action buttons for the bottom of AI reply bubbles, commonly used for message copying, regenerating, evaluation, etc., providing a compact and elegant layout.

Basic Usage ​

You can quickly generate action groups with preset styles through simple string arrays.

Basic Usage

Vertical Layout and Customization ​

Support custom icons, labels, and click logic.

Vertical Layout and Customization

Use with AiBubble ​

Place the action group at the bottom of the conversation bubble.

Use with AiBubble

API ​

Props ​

NameDescriptionTypeDefault
itemsAction items listActionItem[][]
sizeButton size'small' | 'default' | 'large''small'
directionLayout direction'horizontal' | 'vertical''horizontal'

ActionItem Type ​

If it's a string, presets are supported: 'copy' | 'refresh' | 'regenerate' | 'share' | 'thumb-up' | 'thumb-down' | 'edit' | 'delete'. If it's an object:

NameDescriptionType
keyUnique identifierstring
iconIcon namestring
labelText labelstring
disabledWhether disabledboolean
tooltipHover tooltip textstring

Events ​

Event NameDescriptionCallback Parameters
clickTriggered when a button is clicked(key: string, item: ActionItem)

Slots ​

Slot NameDescription
defaultAppend custom content after the action list

Use in Nuxt ​

This component fully supports Nuxt 3/4. In Nuxt projects, the component will be automatically imported.

For detailed configuration, please see Nuxt Integration.

Theme Variables ​

Variable NameDescriptionDefault Value
--yh-ai-action-gapButton spacing8px
--yh-ai-action-icon-sizeIcon size16px
--yh-ai-action-hover-bgHover background colorvar(--yh-fill-color-light)
--yh-ai-action-btn-radiusButton radius4px

Released under the MIT License.