diff --git a/packages/react/src/html/ui/index.css b/packages/react/src/html/ui/index.css
index e385a3eb..5678b7ee 100644
--- a/packages/react/src/html/ui/index.css
+++ b/packages/react/src/html/ui/index.css
@@ -122,6 +122,12 @@ main {
div[role='menu'] {
left: 0;
+ /* Shrink the dropdown to fit its content instead of the fixed
+ * width set by @node-core/ui-components (nodejs/doc-kit#1051) */
+ width: fit-content;
+ min-width: 12rem;
+ max-width: 20rem;
+
/* Prevent long labels from overflowing dropdown width */
a[role='menuitem'] div {
overflow-wrap: anywhere;