Skip to content

Conversation

@thomasyuill-livekit
Copy link
Contributor

Summary

This PR introduces the core agent control components for the @livekit/shadcn package, providing the foundational UI elements for building voice/video agent interfaces.

New Components

AgentControlBar

The main control bar component for agent sessions featuring:

  • Integrated chat input with keyboard controls
  • Track toggle controls (microphone/camera)
  • Permission-aware UI with usePublishPermissions hook
  • Input state management via useInputControls hook

AgentTrackControl

A compound control component that combines track toggling with device selection, providing users the ability to both mute/unmute and switch between available devices.

AgentTrackToggle

A simple toggle button for enabling/disabling audio or video tracks in agent sessions.

AgentDisconnectButton

A styled button to disconnect from the current agent session.

AudioVisualizerBar

A bar-style audio visualizer with smooth animations via the useBarAnimator hook, useful for displaying agent or participant audio activity.

Also Includes

  • Storybook stories for all new components
  • cloneSingleChild utility for component composition
  • Minor style fixes in existing visualizer components

@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

⚠️ No Changeset found

Latest commit: 77be9bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

size-limit report 📦

Path Size
LiveKitRoom only 6 KB (0%)
LiveKitRoom with VideoConference 32.46 KB (0%)
All exports 43.29 KB (+0.08% 🔺)

'data-[state=off]:bg-accent data-[state=off]:hover:bg-foreground/10',
'data-[state=off]:border-border data-[state=off]:hover:border-foreground/12',
'data-[state=off]:text-foreground data-[state=off]:hover:text-foreground data-[state=off]:focus:text-foreground',
'data-[state=on]:bg-blue-500/20 data-[state=on]:hover:bg-blue-500/30 data-[state=on]:border-blue-700/10 data-[state=on]:text-blue-700',
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have the option to use theme tokens for the hard coded blue values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly we do not,
https://ui.shadcn.com/docs/theming#list-of-variables

Introducing our own own variables does not improve the situation, complicates integration, and will not respond to shadcn theme applications

Additional considerations

  • this is an opinionated block level component
  • developers are able to easily fork this component or use it as guide for developing their own

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other option I considered, was to only apply these classes to the livekit variant.

This is a valid approach, but the default component will not look great...

cc @mattherzog for further input here

Copy link
Contributor Author

@thomasyuill-livekit thomasyuill-livekit Dec 10, 2025

Choose a reason for hiding this comment

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

I'm going to go with the alternative for now and only apply these classes to the livekit variant.

We can discuss this in more detail and make adjustment in a future PR.
Here are some screen shots of the result below.

Default
Screenshot 2025-12-10 at 1 22 06 PM
Screenshot 2025-12-10 at 1 21 54 PM
Screenshot 2025-12-10 at 1 20 50 PM

Open Chat
Screenshot 2025-12-10 at 1 27 40 PM
Screenshot 2025-12-10 at 1 22 26 PM
Screenshot 2025-12-10 at 1 22 42 PM

@thomasyuill-livekit thomasyuill-livekit merged commit e5329db into main Dec 10, 2025
6 checks passed
@thomasyuill-livekit thomasyuill-livekit deleted the ty/shadcn-components-1 branch December 10, 2025 18:36
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.

4 participants