Sources
Progressively revealed citation chips.
Install
npx shadcn@latest add https://crate.onerollstudios.com/r/sources.jsonPlayground
Sample data for sources.
<Sources maxVisible={3} sources={sources} />Import
import { Sources } from "@/components/agent-wait-states/sources";Props
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
className | string | no | ||
accent | boolean | no | false | |
labels | Partial<CrateLabels> | no | Replace any of this component's labels. Overrides CrateProvider. | |
sources | AgentSource[] | yes | ||
maxVisible | number | no | 3 |
Labels
Override with the labels prop or a CrateProvider.
| Label | English 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.