Docs / Sources

Sources

Progressively revealed citation chips.

Install

npx shadcn@latest add https://crate.onerollstudios.com/r/sources.json

Playground

crate.onerollstudios.comCrate for coding agentscrate.onerollstudios.comAll Crate componentsgithub.comCrate on GitHub+1 more

Sample data for sources.

<Sources maxVisible={3} sources={sources} />

Import

import { Sources } from "@/components/agent-wait-states/sources";

Props

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleannofalse
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
sourcesAgentSource[]yes
maxVisiblenumberno3

Labels

Override with the labels prop or a CrateProvider.

LabelEnglish default
sources"Sources"
sourceFallback"source"
moreSources(count, f) => `+${f.number(count)} more`

Types

export type SourceItem = AgentSource;

Example

<Sources sources={sources} maxVisible={3} accent />

For coding agents: /llms/sources.md, generated from the same source.