DocsComponentsTemplatesThemesGitHub

Citation

Inline numbered citation marker linking to a source.

Code

import * as React from 'react';
import { Citation } from '@fruit-labs/design';

export default function Demo() {
  return (
    <p
      style={{
        margin: 0,
        fontSize: 15,
      }}
    >
      Revenue grew 12% year over year
      <Citation n={1} />.
    </p>
  );
}

Install

From npm:

npm install @fruit-labs/design

import { Citation } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/citation.json

Guidelines

  • Place after the sentence it supports.

Props

PropTypeRequired
nnumberYes
hrefstringNo

Edit this example on GitHub