Locara
← All components AI affordances

AcceptReject

Notion-AI / Granola accept-edit-discard ribbon. Sits below an AI block with Accept / Try again / Discard.

Inspired by Notion AI inline block, Granola enhanced notes.

Preview

What it looks like.

The Cursor/Granola accept-reject affordance. Outcome: pending.
// Pull out the empty-array guard so 'data' can be undefined safely.
return useMemo(() => {
  if (!data?.length) return []
  return data.filter((d) => d.active)
}, [data])

Live — the real component, scoped to this frame.

Usage

Drop it into your app.

import { AcceptReject } from '@locara/components'

<AcceptReject
  label="Suggested rewrite · 1 sentence"
  onAccept={() => doc.applyEdit(edit)}
  onRetry={() => llm.regenerate()}
  onDiscard={() => doc.dismissEdit(edit)}
/>

Or copy the source into your repo: locara add accept-reject