RefusalCard

Graceful handling of declined AI requests. Shows the reason, categorizes by type, and offers alternative prompts — turning rejection into guidance.

RefusalCard — All Types
RefusalCard — Custom Content

Import

tsx
import { RefusalCard } from "@arc-lo/ui";

Basic usage

tsx
<RefusalCard
  type="safety"
  reason="I can't help with that request."
  suggestions={[
    "Tell me about safety best practices",
    "How does content moderation work?",
  ]}
  onSuggestionClick={(s) => submitPrompt(s)}
/>

Types

tsx
{/* Safety — red accent, shield icon */}
<RefusalCard type="safety" />

{/* Capability — amber accent, lightning icon */}
<RefusalCard
  type="capability"
  reason="I can't access external URLs."
/>

{/* Policy — orange accent, clipboard icon */}
<RefusalCard
  type="policy"
  reason="That falls outside my usage policy."
/>

{/* Context — blue accent, search icon */}
<RefusalCard
  type="context"
  reason="I don't have enough context."
/>

With custom content

tsx
<RefusalCard type="capability" reason="I can't generate images.">
  <p className="mt-2 text-sm text-gray-500">
    Try using DALL-E or Midjourney for image generation.
  </p>
</RefusalCard>

Props

PropTypeDefaultDescription
type"safety" | "capability" | "policy" | "context""capability"Refusal category
reasonstringWhy the request was refused
suggestionsstring[]Alternative prompt suggestions
onSuggestionClick(suggestion: string) => voidCalled when user clicks a suggestion
iconReactNodeOverride default icon

Refusal types

TypeColorIconUse case
safetyRedShieldHarmful content requests
capabilityAmberLightningFeature not supported
policyOrangeClipboardUsage policy violation
contextBlueSearchInsufficient information