Skip to content

Commit f1491d2

Browse files
fix(spotlight): cap header trigger width to match production search field
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e82f862 commit f1491d2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/shared/src/components/spotlight/SpotlightTrigger.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,15 @@ export const SpotlightTrigger = ({
5151
aria-keyshortcuts={`${shortcutKeys.join('+')}`}
5252
onClick={open}
5353
className={classNames(
54+
// Sizing, color, and shape match the production SearchPanel field.
5455
'relative flex h-12 w-full items-center overflow-hidden rounded-12 border border-transparent bg-background-subtle px-3 text-left transition-colors',
5556
'hover:bg-surface-hover',
5657
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-cabbage-default focus-visible:ring-offset-2',
57-
'laptop:py-1 laptop:backdrop-blur-[3.75rem]',
58+
// Same compact desktop width used by SearchPanelInput in production
59+
// (26.25rem default, capped at 29.5rem on laptop and 35rem on
60+
// laptopL). Without this the trigger stretches edge-to-edge,
61+
// which read as a different field even though the styling matched.
62+
'laptop:w-[26.25rem] laptop:max-w-[29.5rem] laptop:py-1 laptop:backdrop-blur-[3.75rem] laptopL:max-w-[35rem]',
5863
className,
5964
)}
6065
>

0 commit comments

Comments
 (0)