CSS Customization

Restyle the prebuilt Angular chat with scoped CSS on its stable classes.

Restyle the prebuilt chat from Prebuilt Components with plain CSS. Import the package stylesheet first, as shown in Add an inline chat.

Scope CSS changes

The package stylesheet exposes stable chat classes. Put a scope class on your feature host so the change stays local.

src/styles.css
.support-chat .copilotKitUserMessage {
  color: white;
  background: #2563eb;
  border-radius: 0.75rem;
}

.support-chat .copilotKitAssistantMessage {
  padding: 0.75rem;
  color: #172554;
  background: #eff6ff;
  border-radius: 0.75rem;
}

Next steps

  • Slots: replace a part of the chat with your own component.

How is this guide?