Skip to content

feat: S2 PromptField styles#10320

Merged
devongovett merged 36 commits into
mainfrom
promptfield-styles
Jul 10, 2026
Merged

feat: S2 PromptField styles#10320
devongovett merged 36 commits into
mainfrom
promptfield-styles

Conversation

@devongovett

Copy link
Copy Markdown
Member

Adds colorful new S2 styles for PromptField, and new AI loader animation. The PromptField can be themed by setting the --brand variable. All colors are calculated based on this using oklch relative colors.

devongovett and others added 30 commits June 18, 2026 20:11
macOS limits Unix domain socket paths to 104 characters. Deep paths (e.g.
git worktrees inside .claude/worktrees/) push the project-relative socket
path over that limit, causing EINVAL on server.listen(). Fall back to
os.tmpdir() when the path would exceed the limit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ld-styles

# Conflicts:
#	packages/@react-spectrum/ai/src/TokenField.tsx
#	packages/@react-spectrum/ai/test/TokenField.browser.test.tsx
#	packages/react-aria/src/interactions/createEventHandler.ts
@rspbot

rspbot commented Jul 10, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 10, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 10, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 10, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 10, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/ai

/@react-spectrum/ai:PromptField

 PromptField {
   acceptedAttachmentTypes?: Array<string>
   children: React.ReactNode
   isGenerating?: boolean
   onAddAttachments?: (Array<PromptFieldAttachment>) => void
   onRemoveAttachments?: (Array<PromptFieldAttachment>) => void
   onStop?: () => void
   onSubmit?: (TokenSegmentList, Array<PromptFieldAttachment>) => void
   styles?: StyleString
+  variant?: 'balanced' | 'prominent' | 'subtle'
 }

/@react-spectrum/ai:PromptTokenField

 PromptTokenField {
   children?: (TokenSegment) => React.ReactElement
   completionTrigger?: RegExp
+  pixelLoader?: Array<Cell> | Array<Array<Cell>>
+  placeholder?: string
   renderCompletions?: (string) => Array<React.ReactNode> | null | Promise<Array<React.ReactNode> | null>
 }

/@react-spectrum/ai:PromptFieldProps

 PromptFieldProps {
   acceptedAttachmentTypes?: Array<string>
   children: React.ReactNode
   isGenerating?: boolean
   onAddAttachments?: (Array<PromptFieldAttachment>) => void
   onRemoveAttachments?: (Array<PromptFieldAttachment>) => void
   onStop?: () => void
   onSubmit?: (TokenSegmentList, Array<PromptFieldAttachment>) => void
   styles?: StyleString
+  variant?: 'balanced' | 'prominent' | 'subtle'
 }

/@react-spectrum/ai:PromptTokenFieldProps

 PromptTokenFieldProps {
   children?: (TokenSegment) => React.ReactElement
   completionTrigger?: RegExp
+  pixelLoader?: Array<Cell> | Array<Array<Cell>>
+  placeholder?: string
   renderCompletions?: (string) => Array<React.ReactNode> | null | Promise<Array<React.ReactNode> | null>
 }

@LFDanLu LFDanLu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very fancy lol. IMO dark mode feels pretty intense when compared to light mode but that checks out when compared to the figma file...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Out of curiosity since I just added isDisabled styles to the PromptField on my end, are there designs for isDisabled anywhere for this new prompt field look? I looked in the AI Prompt Field figma but didn't find anything but maybe I don't have access/don't know about others

@devongovett devongovett added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit b14cbd5 Jul 10, 2026
31 checks passed
@devongovett devongovett deleted the promptfield-styles branch July 10, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants