HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Meter
  • Multi Select
  • Native Select
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Citations

PreviousNext

Numbered source markers inside an AI answer, with a preview of each source and a list of every source under the answer.

Base UIReact AriaRadix UI
What are the CRA instalment deadlines for 2027?

For a corporation, instalments are due on the last day of each month of the tax year. A small CCPC that qualifies can pay quarterly instead, which for a calendar year means March 31, June 30, September 30 and December 31.

With a December 31 year end, the plan is monthly payments of about $1,533 starting January 31, 2027. Paying late or short adds interest that compounds daily, so it is worth setting these up as scheduled payments.

Source 1: Paying your corporation tax by instalments, canada.caSource 2: Quarterly instalments for small CCPCs, canada.caSource 3: 2027 tax planning memo.pdfSource 4: Instalment interest and penalties explained, accountingnotes.ca

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/citations.json

Usage#

import {
  Citation,
  Citations,
  CitedText,
  SourcesList,
  type CitationSource,
} from "@/components/ui/citations"
const sources: CitationSource[] = [
  {
    id: "cra",
    type: "web",
    title: "Paying your corporation tax by instalments",
    domain: "canada.ca",
    url: "https://www.canada.ca",
    snippet: "Each payment is due on the last day of every complete month.",
    quote: "last day of every complete month",
  },
  { id: "memo", type: "file", title: "2027 tax planning memo.pdf" },
]
 
<Citations sources={sources}>
  <CitedText>Instalments are due at the end of each month [1].</CitedText>
  <p>
    The plan starts in January <Citation index={2} />.
  </p>
  <SourcesList />
</Citations>

Parts#

  • Citations. Holds the sources for one answer and which one is highlighted. Markers and the list inside it share that state.
  • CitedText. A paragraph that turns [1] or [2, 3] in its text into markers. renderCitations(text) does the same and returns the nodes, for your own markup.
  • Citation. One marker. Pass the 1-based index or a source id. Where the pointer can hover it opens a hover card. On touch screens it opens a popover on tap. Each marker is a button described by its source title for screen readers.
  • SourcesList. A row of source icons with a count that opens into a numbered list. Hovering a row highlights its markers in the answer, and hovering a marker highlights its row.

Sources#

FieldDescription
idUnique id.
titlePage or file name.
typeweb, file or note. Picks the fallback icon.
urlOpens from the card and the list.
domainShown beside the icon.
faviconImage URL. Falls back to an icon for its type.
snippetThe passage the answer used.
quotePart of the snippet to highlight.
datePublished or uploaded date.
CheckboxCode Block

On This Page

InstallationUsagePartsSources