Skip to content

docs(site): add menu reference#1673

Merged
decepulis merged 1 commit into
mainfrom
docs/menus
Jul 7, 2026
Merged

docs(site): add menu reference#1673
decepulis merged 1 commit into
mainfrom
docs/menus

Conversation

@sampotts

@sampotts sampotts commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Work against #1672 (not closed, requires follow-up work)

Summary

Add the missing Menu component reference page and focused demos for React and HTML. This also updates the playback-rate and captions button references so their menu-trigger behavior matches the current Menu API.

Changes

  • Add Menu anatomy, behavior, styling, accessibility, examples, and generated component reference tables.
  • Add React and HTML settings-menu demos covering playback-rate and captions submenu triggers.
  • Document menuTrigger behavior on captions and playback-rate buttons.

Testing

  • pnpm -F site api-docs
  • pnpm -F site build

Note

Low Risk
Documentation and demo assets only; library changes are JSDoc comment updates with no runtime logic changes.

Overview
Adds the Menu component reference (anatomy, submenus, setting type values, styling, a11y) plus new QualityRadioGroup and AudioTrackRadioGroup pages, and wires them into the docs sidebar.

Ships matching React and HTML settings-menu demos (quality, audio, speed, captions submenus with Menu.ItemValue / radio groups) and documents menuTrigger on the captions and playback-rate button references. React Menu.Item / Menu.Trigger JSDoc now lists quality and audio-track alongside the existing setting types.

Reviewed by Cursor Bugbot for commit bbaa837. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Jun 30, 2026 5:33am

Request Review

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Initial
/video (default) 45.70 kB
/video (default + hls) 185.14 kB
/video (minimal) 45.70 kB
/video (minimal + hls) 185.19 kB
/audio (default) 39.03 kB
/audio (minimal) 38.13 kB
/background 4.20 kB
Media (10)
Entry Initial
/media/background-video 1.14 kB
/media/container 1.72 kB
/media/dash-video 214.74 kB
/media/hlsjs-video 141.28 kB
/media/mux-audio 163.72 kB
/media/mux-video 163.70 kB
/media/native-hls-video 9.05 kB
/media/simple-hls-audio-only 17.15 kB
/media/simple-hls-video 18.69 kB
/media/vimeo-video 12.31 kB
Players (5)
Entry Initial
/video/player 8.22 kB
/audio/player 5.38 kB
/background/player 3.92 kB
/live-video/player 7.64 kB
/live-audio/player 5.39 kB
Skins (30)
Entry Type Initial
/video/minimal-skin.css css 5.71 kB
/video/skin.css css 5.68 kB
/video/minimal-skin js 45.67 kB
/video/minimal-skin.tailwind js 46.35 kB
/video/skin js 45.69 kB
/video/skin.tailwind js 46.49 kB
/audio/minimal-skin.css css 3.85 kB
/audio/skin.css css 3.76 kB
/audio/minimal-skin js 38.15 kB
/audio/minimal-skin.tailwind js 38.59 kB
/audio/skin js 39.03 kB
/audio/skin.tailwind js 39.55 kB
/background/skin.css css 133 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 5.71 kB
/live-video/skin.css css 5.68 kB
/live-video/minimal-skin js 44.65 kB
/live-video/minimal-skin.tailwind js 45.21 kB
/live-video/skin js 44.30 kB
/live-video/skin.tailwind js 44.89 kB
/live-audio/minimal-skin.css css 3.85 kB
/live-audio/skin.css css 3.76 kB
/live-audio/minimal-skin js 30.77 kB
/live-audio/minimal-skin.tailwind js 30.13 kB
/live-audio/skin js 31.79 kB
/live-audio/skin.tailwind js 31.29 kB
/global.css css 176 B
/shared.css css 104 B
/tailwind.css css 228 B
/skin-element js 1.45 kB
UI Components (39)
Entry Initial
/ui/airplay-button 2.36 kB
/ui/alert-dialog 2.45 kB
/ui/alert-dialog-close 2.22 kB
/ui/alert-dialog-description 2.17 kB
/ui/alert-dialog-title 2.13 kB
/ui/audio-track-radio-group 2.87 kB
/ui/buffering-indicator 2.27 kB
/ui/captions-button 2.41 kB
/ui/captions-radio-group 2.76 kB
/ui/cast-button 2.31 kB
/ui/compounds 2.96 kB
/ui/controls 2.70 kB
/ui/error-dialog 2.73 kB
/ui/fullscreen-button 2.32 kB
/ui/hotkey 2.35 kB
/ui/menu 2.75 kB
/ui/mute-button 2.34 kB
/ui/pip-button 2.35 kB
/ui/play-button 2.36 kB
/ui/playback-rate-button 2.33 kB
/ui/playback-rate-radio-group 2.77 kB
/ui/popover 2.68 kB
/ui/poster 2.19 kB
/ui/quality-radio-group 2.77 kB
/ui/seek-button 2.27 kB
/ui/seek-indicator 2.37 kB
/ui/seek-indicator-value 450 B
/ui/slider 2.74 kB
/ui/status-announcer 2.26 kB
/ui/status-indicator 2.27 kB
/ui/status-indicator-value 384 B
/ui/thumbnail 2.16 kB
/ui/time 2.71 kB
/ui/time-slider 2.75 kB
/ui/tooltip 2.67 kB
/ui/volume-indicator 2.32 kB
/ui/volume-indicator-fill 379 B
/ui/volume-indicator-value 399 B
/ui/volume-slider 2.75 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Initial
/video (default) 37.83 kB
/video (default + hls) 176.12 kB
/video (minimal) 38.18 kB
/video (minimal + hls) 176.62 kB
/audio (default) 30.67 kB
/audio (minimal) 30.75 kB
/background 754 B
Media (9)
Entry Initial
/media/background-video 575 B
/media/dash-video 213.24 kB
/media/hlsjs-video 139.79 kB
/media/mux-audio 162.25 kB
/media/mux-video 162.33 kB
/media/native-hls-video 7.39 kB
/media/simple-hls-audio-only 15.56 kB
/media/simple-hls-video 17.15 kB
/media/vimeo-video 10.58 kB
Skins (27)
Entry Type Initial
/tailwind.css css 228 B
/video/minimal-skin.css css 5.62 kB
/video/skin.css css 5.57 kB
/video/minimal-skin js 38.16 kB
/video/minimal-skin.tailwind js 44.19 kB
/video/skin js 37.81 kB
/video/skin.tailwind js 43.76 kB
/audio/minimal-skin.css css 3.72 kB
/audio/skin.css css 3.62 kB
/audio/minimal-skin js 30.65 kB
/audio/minimal-skin.tailwind js 32.75 kB
/audio/skin js 30.60 kB
/audio/skin.tailwind js 34.75 kB
/background/skin.css css 90 B
/background/skin js 272 B
/live-video/minimal-skin.css css 5.62 kB
/live-video/skin.css css 5.57 kB
/live-video/minimal-skin js 33.29 kB
/live-video/minimal-skin.tailwind js 39.23 kB
/live-video/skin js 33.27 kB
/live-video/skin.tailwind js 39.22 kB
/live-audio/minimal-skin.css css 3.72 kB
/live-audio/skin.css css 3.62 kB
/live-audio/minimal-skin js 21.94 kB
/live-audio/minimal-skin.tailwind js 24.94 kB
/live-audio/skin js 21.98 kB
/live-audio/skin.tailwind js 25.09 kB
UI Components (33)
Entry Initial
/ui/airplay-button 2.15 kB
/ui/alert-dialog 2.08 kB
/ui/audio-track 2.11 kB
/ui/buffering-indicator 2.07 kB
/ui/captions-button 2.17 kB
/ui/captions-radio-group 2.06 kB
/ui/cast-button 2.15 kB
/ui/controls 1.98 kB
/ui/error-dialog 2.21 kB
/ui/fullscreen-button 2.09 kB
/ui/gesture 2.17 kB
/ui/hotkey 2.13 kB
/ui/live-button 2.07 kB
/ui/menu 2.21 kB
/ui/mute-button 2.24 kB
/ui/pip-button 2.16 kB
/ui/play-button 2.14 kB
/ui/playback-rate 2.03 kB
/ui/playback-rate-button 2.14 kB
/ui/popover 2.53 kB
/ui/poster 2.01 kB
/ui/quality 2.05 kB
/ui/seek-button 2.15 kB
/ui/seek-indicator 1.98 kB
/ui/slider 2.18 kB
/ui/status-announcer 2.03 kB
/ui/status-indicator 2.03 kB
/ui/thumbnail 1.95 kB
/ui/time 1.95 kB
/ui/time-slider 2.23 kB
/ui/tooltip 2.61 kB
/ui/volume-indicator 1.98 kB
/ui/volume-slider 2.18 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (14)
Entry Initial
. 9.22 kB
/dom 17.44 kB
/dom/media/custom-media-element 2.09 kB
/dom/media/dash 209.07 kB
/dom/media/google-cast 4.04 kB
/dom/media/hls-js 135.68 kB
/dom/media/media-host 1.25 kB
/dom/media/media-played-ranges 576 B
/dom/media/mux 151.26 kB
/dom/media/native-hls 3.05 kB
/dom/media/simple-hls 16.47 kB
/dom/media/simple-hls-audio-only 14.92 kB
/dom/media/vimeo 9.86 kB
/media/predicate 563 B
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.39 kB
/html 696 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Initial
/array 104 B
/dom 2.26 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 231 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (4)
Entry Initial
. 4.45 kB
/dom 6.33 kB
/hls 15.37 kB
/background-video 12.85 kB

ℹ️ How to interpret

JS sizes are initial static graph totals (minified + brotli). Lazy dynamic chunks are shown separately when present.

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current initial sizes.

@sampotts sampotts requested a review from decepulis June 10, 2026 06:43
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit bbaa837
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a435509d8d7e400082097f4
😎 Deploy Preview https://deploy-preview-1673--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@decepulis decepulis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting a change to anatomy. But. Good otherwise!

Comment on lines +26 to +101
<FrameworkCase frameworks={["react"]}>
```tsx
<Menu.Root>
<Menu.Trigger>Settings</Menu.Trigger>
<Menu.Content>
<Menu.View>
<Menu.Root>
<Menu.Trigger type="playback-rate">
Speed <Menu.ItemValue />
</Menu.Trigger>
<Menu.Content>
<Menu.Back />
<Menu.RadioGroup value={rate} onValueChange={setRate}>
<Menu.GroupLabel>Speed</Menu.GroupLabel>
<Menu.RadioItem value="1">Normal</Menu.RadioItem>
<Menu.RadioItem value="1.5">1.5x</Menu.RadioItem>
</Menu.RadioGroup>
</Menu.Content>
</Menu.Root>

<Menu.Root>
<Menu.Trigger type="captions">
Captions <Menu.ItemValue />
</Menu.Trigger>
<Menu.Content>
<Menu.Back />
<Menu.RadioGroup value={captions} onValueChange={setCaptions}>
<Menu.GroupLabel>Captions</Menu.GroupLabel>
<Menu.RadioItem value="off">Off</Menu.RadioItem>
<Menu.RadioItem value="en">English</Menu.RadioItem>
</Menu.RadioGroup>
</Menu.Content>
</Menu.Root>

<Menu.Item onSelect={copyLink}>Copy link</Menu.Item>
</Menu.View>
</Menu.Content>
</Menu.Root>
```
</FrameworkCase>

<FrameworkCase frameworks={["html"]}>
```html
<button type="button" commandfor="settings-menu">Settings</button>

<media-menu id="settings-menu">
<media-menu-view>
<media-menu-item commandfor="speed-menu" type="playback-rate">
Speed <media-menu-item-value></media-menu-item-value>
</media-menu-item>
<media-menu-item commandfor="captions-menu" type="captions">
Captions <media-menu-item-value></media-menu-item-value>
</media-menu-item>
<media-menu-item>Copy link</media-menu-item>
</media-menu-view>

<media-menu id="speed-menu">
<media-menu-back></media-menu-back>
<media-menu-radio-group value="1">
<media-menu-group-label>Speed</media-menu-group-label>
<media-menu-radio-item value="1">Normal</media-menu-radio-item>
<media-menu-radio-item value="1.5">1.5x</media-menu-radio-item>
</media-menu-radio-group>
</media-menu>

<media-menu id="captions-menu">
<media-menu-back></media-menu-back>
<media-menu-radio-group value="off">
<media-menu-group-label>Captions</media-menu-group-label>
<media-menu-radio-item value="off">Off</media-menu-radio-item>
<media-menu-radio-item value="en">English</media-menu-radio-item>
</media-menu-radio-group>
</media-menu>
</media-menu>
```
</FrameworkCase>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The intent of Anatomy is to show off the available components and their intended hierarchy, not necessarily to give a working example. I think you can drop a lot of the detail here. More like this https://base-ui.com/react/components/menu

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If the docs skill misled you, it might need some editing!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This has been updated!

@decepulis decepulis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm a little confused by the asymmetry between captions/playback-rate and audio-track/quality. Should we have docs for captions-radio-group and playback-rate-radio-group? It does look like they exist.

Also noticed a few undocumented hooks.

Still, looks like this is an improvement for the docs and ready to merge as-is, so, I'll approve and we can hit the missing APIs in a follow-up!

@decepulis decepulis merged commit cc020b4 into main Jul 7, 2026
26 checks passed
@decepulis decepulis deleted the docs/menus branch July 7, 2026 18:06
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.

2 participants