Skip to content

feat(react-chat): allow custom className on ChatMessage and ChatMyMessage#622

Open
themechbro wants to merge 1 commit intomicrosoft:mainfrom
themechbro:fix/388-chatmessage-classname
Open

feat(react-chat): allow custom className on ChatMessage and ChatMyMessage#622
themechbro wants to merge 1 commit intomicrosoft:mainfrom
themechbro:fix/388-chatmessage-classname

Conversation

@themechbro
Copy link
Copy Markdown

This PR updates the TypeScript definitions for the react-chat package to allow developers to pass a custom className prop to the message components.

The underlying styles hook (mergeClasses) was already configured to accept and merge state.root.className, but the prop was being explicitly blocked by Omit in the type definitions.

Changes:

  • Removed 'className' from the omitted props in ChatMessageProps (ChatMessage.types.ts).
  • Removed 'className' from the omitted props in ChatMyMessageProps (ChatMyMessage.types.ts).

Related Issue
Fixes #388

Type of change

  • Bug fix / Feature update (non-breaking change)
  • Breaking change
  • Documentation update

Testing
Verified locally in Storybook that passing successfully attaches the class to the rendered DOM element alongside the standard fui-ChatMessage classes.

@themechbro themechbro requested a review from a team as a code owner March 26, 2026 18:24
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.

ChatMessage - allow to pass custom className

1 participant