Skip to content

feat: custom footer slots#1001

Open
warrenmblood wants to merge 9 commits intocarbon-design-system:mainfrom
warrenmblood:custom-footer-slot
Open

feat: custom footer slots#1001
warrenmblood wants to merge 9 commits intocarbon-design-system:mainfrom
warrenmblood:custom-footer-slot

Conversation

@warrenmblood
Copy link
Contributor

Closes #646

Adds support for custom footer slots on assistant messages. This enables developers to insert any set of action buttons alongside the feedback buttons.

Changelog

New

  • Messages received with custom footer will fire event BusEventCustomFooterSlot
  • Implemented event handling to render custom footers
  • New render prop renderCustomMessageFooter added to ChatContainerProps. This is the function called when a custom footer should be rendered.
  • Types:
    • GenericItemMessageOptions supports custom footers
    • GenericItemCustomFooterSlotOptions
  • Added CustomFooterPortalsContainer.tsx component to manage all custom footer slots
  • Tests for attachCustomFooterHandler
  • React & WC demo example "text with custom footer"

Changed

  • Feedback rendered inside container element alongside custom chat actions

Removed

  • Removed feedback-buttons.scss as styling now applied to container element with class cds-aichat--message-footer

Testing / Reviewing

  • Test demo example "text with custom footer" for React & WC in all layouts (Fullscreen, Sidebar, Float)
  • CI tests should pass

@warrenmblood warrenmblood requested a review from a team as a code owner February 25, 2026 23:14
@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for carbon-ai-chat-components ready!

Name Link
🔨 Latest commit 2fbdd2a
🔍 Latest deploy log https://app.netlify.com/projects/carbon-ai-chat-components/deploys/69a0a1a6ecefb60008441b36
😎 Deploy Preview https://deploy-preview-1001--carbon-ai-chat-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for carbon-ai-chat-demo ready!

Name Link
🔨 Latest commit 2fbdd2a
🔍 Latest deploy log https://app.netlify.com/projects/carbon-ai-chat-demo/deploys/69a0a1a6493f940007b09f98
😎 Deploy Preview https://deploy-preview-1001--carbon-ai-chat-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for ai-chat-components-react ready!

Name Link
🔨 Latest commit 2fbdd2a
🔍 Latest deploy log https://app.netlify.com/projects/ai-chat-components-react/deploys/69a0a1a6ecefb60008441b38
😎 Deploy Preview https://deploy-preview-1001--ai-chat-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@warrenmblood warrenmblood changed the title Custom footer slot feat: custom footer slots Feb 25, 2026
Copy link
Contributor

@ethanwinters ethanwinters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably would be good to add a section under user defined responses to https://github.com/carbon-design-system/carbon-ai-chat/blob/main/packages/ai-chat/docs/React.md and the web component one, too.

<Copy16 />
</IconButton>
)}
{Boolean(additionalData?.allow_regenerate) && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we should make an issue to make a regeneration examples/react and examples/web-component and then apply those changes to the demo site as well... and maybe just remove this for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! #1009

return (
<div className="cds-aichat--received--feedback">
<div className="cds-aichat--message-footer">
{customFooter}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets put the customFooter after the feedback buttons.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only reason for this ordering was to avoid the action buttons moving to the left when the feedback buttons don't persist. Now that I test it out it doesn't look bad, but here's what I mean:

Screen.Recording.2026-02-26.at.10.58.43.AM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new slot needed for after each message

2 participants