Refined UI

An opinionated, customizable superset of shadcn/ui

AgentsPrimitivesSkillsSkins
Integration
Guides
  • Overview
  • Get started
  • Shadcn compatibility
  • Architecture
  • Agent surface
Agents
  • Action Bar
  • Audio Recorder
  • Audio VisualizerBetaBeta — the props contract is close to final, but small breaking changes can still land.
  • Chat Input
  • Chat Input Attachment
  • Chat Message
  • Chat Scene
  • Code Block Editor
  • Dynamic NotificationExpExperimental — the contract and the rendering can change without notice. Own the installed copy before shipping it.
  • Environment Variables
  • Inline Attachment
  • Markdown Block
  • Task List
  • Thread Rail
  • Tool Call
  • User Ask
Blocks
  • Chat
  • Theme toggle
  1. Agents
  2. UserAsk
Agents

UserAsk

Keyboard-first agent question panel that temporarily replaces the chat composer inside its container.

Composition

The preferred shape for composing the installed agent from its exported parts.

Parts

Exported compound parts from the installed source.

UserAsk
├── UserAskHeader
├── UserAskTitle
├── UserAskPagination
├── UserAskQuestion
├── UserAskOption
├── UserAskOptionLabel
├── UserAskOptionDescription
├── UserAskOptionInput
├── UserAskFooter
├── UserAskDismiss
└── UserAskSubmit

This agent installs from the user-ask registry. Install the bundle with the command above, or inspect the source below.

Registry command
npx shadcn@latest add http://127.0.0.1:3000/r/refined/user-ask.json
See registry manifest

Usage

import type { UserAskAnswers } from "@/components/refined-ui/contracts";
import {
UserAsk,
UserAskDismiss,
UserAskFooter,
UserAskHeader,
UserAskOption,
UserAskOptionInput,
UserAskOptionLabel,
UserAskQuestion,
UserAskSubmit,
UserAskTitle,
} from "@/components/refined-ui/user-ask";
​
// Render your agent's ask-user tool call in place of the composer; feed the answers back as the tool result.
export function Example({ onAnswer }: { onAnswer: (answers: UserAskAnswers) => void }) {
return (
<UserAsk autoFocus onComplete={onAnswer} onDismiss={() => onAnswer({})}>
<UserAskHeader>
<UserAskTitle />
</UserAskHeader>
<UserAskQuestion id="scope" title="What should this run focus on?" defaultValue="fix">
<UserAskOption value="fix" recommended>
<UserAskOptionLabel>Tiny repo fix</UserAskOptionLabel>
</UserAskOption>
<UserAskOption value="polish">
<UserAskOptionLabel>UI polish</UserAskOptionLabel>
</UserAskOption>
<UserAskOptionInput label="Something else" />
</UserAskQuestion>
<UserAskFooter>
<UserAskDismiss />
<UserAskSubmit />
</UserAskFooter>
</UserAsk>
);
}
​

Installed dependencies

Installed with this agent because the visible component depends on them; they are support files, not separate product surfaces.

Behavior hooksrc/registry/hooks/use-user-ask.tsHook

Raw code

Primary installed agent source

Component
src/registry/sources/refined/user-ask.tsx

Primitives

This agent composes these library primitives, installed under components/refined-ui/ui/*.

Buttoncomponents/refined-ui/ui/button.tsxLibrary slotKbdcomponents/refined-ui/ui/kbd.tsxLibrary slot

On this page

  • Preview
  • Composition
  • Installation
  • Usage
  • Dependencies
  • Source
  • Primitives