page.tsx 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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">
  17. Or with other package managers:
  18. </p>
  19. <Code lang="bash">{`# pnpm
  20. pnpm add @json-render/core @json-render/react
  21. # yarn
  22. yarn add @json-render/core @json-render/react
  23. # bun
  24. bun add @json-render/core @json-render/react`}</Code>
  25. <h2 className="text-xl font-semibold mt-12 mb-4">Peer Dependencies</h2>
  26. <p className="text-sm text-muted-foreground mb-4">
  27. json-render requires the following peer dependencies:
  28. </p>
  29. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  30. <li>
  31. <code className="text-foreground">react</code> ^19.0.0
  32. </li>
  33. <li>
  34. <code className="text-foreground">zod</code> ^4.0.0
  35. </li>
  36. </ul>
  37. <Code lang="bash">npm install react zod</Code>
  38. <h2 className="text-xl font-semibold mt-12 mb-4">For AI Integration</h2>
  39. <p className="text-sm text-muted-foreground mb-4">
  40. To use json-render with AI models, you&apos;ll also need the Vercel AI
  41. SDK:
  42. </p>
  43. <Code lang="bash">npm install ai</Code>
  44. <div className="flex gap-3 mt-12">
  45. <Button size="sm" asChild>
  46. <Link href="/docs/quick-start">Quick Start</Link>
  47. </Button>
  48. </div>
  49. </article>
  50. );
  51. }