The Open Standard for Generative UI
.root {
position: relative;
flex: none;
}
.button {
display: flex;
box-sizing: border-box;
height: 2.25rem;
align-items: center;
gap: 0.375rem;
padding-inline: 0.625rem;
border: 0;
border-radius: 10px;
background: var(--openui-inverted-background);
box-shadow:
inset 0 2px 1px -0.5px color-mix(in srgb, var(--openui-inverted-background) 84%, white),
inset 0 -3px 6px -1px color-mix(in srgb, var(--openui-inverted-background) 90%, black);
color: var(--openui-background);
font-family: "Inter", "Segoe UI", sans-serif;
font-size: 0.9375rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
cursor: pointer;
transition: opacity 120ms ease;
}
.button:hover {
opacity: 0.88;
}
.button:focus-visible {
outline: 2px solid var(--openui-text-neutral-primary);
outline-offset: 2px;
}
.arrow {
transition: transform 160ms ease;
}
.arrow[data-open="true"] {
transform: rotate(90deg);
}
.menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
z-index: 60;
width: 22.5rem;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity 0.18s ease,
visibility 0s linear 0.18s;
}
.menuOpen {
opacity: 1;
visibility: visible;
pointer-events: auto;
transition:
opacity 0.18s ease,
visibility 0s;
}
.menuCard {
display: flex;
flex-direction: column;
gap: 2px;
border: 1px solid var(--openui-border-default);
border-radius: 12px;
background: var(--openui-foreground);
padding: 0.375rem;
box-shadow: var(--openui-shadow-l);
}
.menuItem {
display: flex;
width: 100%;
min-height: 40px;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 8px 12px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--openui-text-neutral-primary);
font-size: 0.8125rem;
line-height: 1.25rem;
white-space: nowrap;
cursor: pointer;
transition: background-color 120ms ease;
}
.menuItem:hover {
background: var(--openui-highlight) !important;
}
.menuItem:focus-visible {
outline: 2px solid var(--openui-border-accent-emphasis);
outline-offset: -2px;
}
.menuItemLabel {
overflow: hidden;
text-overflow: ellipsis;
}
.menuItemRunner {
color: var(--openui-text-neutral-primary);
font-weight: 600;
}
.menuItemIcon {
display: inline-flex;
width: 1.5rem;
height: 1.5rem;
flex-shrink: 0;
align-items: center;
justify-content: center;
color: var(--openui-text-neutral-secondary);
opacity: 0;
transition: opacity 0.12s ease;
}
.menuItem:hover .menuItemIcon,
.menuItem:focus-visible .menuItemIcon {
opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
.button,
.arrow,
.menu,
.menuItem {
transition: none;
}
}