page.tsx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import Link from "next/link";
  2. import { Button } from "@/components/ui/button";
  3. import { Code } from "@/components/code";
  4. export const metadata = {
  5. title: "Installation | json-render",
  6. };
  7. export default function InstallationPage() {
  8. return (
  9. <article>
  10. <h1 className="text-3xl font-bold mb-4">Installation</h1>
  11. <p className="text-muted-foreground mb-8">
  12. Install the core and React packages to get started.
  13. </p>
  14. <h2 className="text-xl font-semibold mt-12 mb-4">Install packages</h2>
  15. <Code lang="bash">npm install @json-render/core @json-render/react</Code>
  16. <p className="text-sm text-muted-foreground mb-4">Or with other package managers:</p>
  17. <Code lang="bash">{`# pnpm
  18. pnpm add @json-render/core @json-render/react
  19. # yarn
  20. yarn add @json-render/core @json-render/react
  21. # bun
  22. bun add @json-render/core @json-render/react`}</Code>
  23. <h2 className="text-xl font-semibold mt-12 mb-4">Peer Dependencies</h2>
  24. <p className="text-sm text-muted-foreground mb-4">
  25. json-render requires the following peer dependencies:
  26. </p>
  27. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  28. <li><code className="text-foreground">react</code> ^19.0.0</li>
  29. <li><code className="text-foreground">zod</code> ^3.0.0</li>
  30. </ul>
  31. <Code lang="bash">npm install react zod</Code>
  32. <h2 className="text-xl font-semibold mt-12 mb-4">For AI Integration</h2>
  33. <p className="text-sm text-muted-foreground mb-4">
  34. To use json-render with AI models, you&apos;ll also need the Vercel AI SDK:
  35. </p>
  36. <Code lang="bash">npm install ai</Code>
  37. <div className="flex gap-3 mt-12">
  38. <Button size="sm" asChild>
  39. <Link href="/docs/quick-start">Quick Start</Link>
  40. </Button>
  41. </div>
  42. </article>
  43. );
  44. }