features.tsx 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. "use client"
  2. import { motion } from "framer-motion"
  3. import { FaRobot, FaCode, FaBrain, FaTools, FaTerminal, FaPuzzlePiece, FaGlobe } from "react-icons/fa"
  4. import { FeaturesMobile } from "./features-mobile"
  5. import { ReactNode } from "react"
  6. export interface Feature {
  7. icon: ReactNode
  8. title: string
  9. description: string
  10. size: "small" | "large"
  11. }
  12. export const features: Feature[] = [
  13. {
  14. icon: <FaRobot className="h-6 w-6" />,
  15. title: "Your AI Dev Team in VS Code",
  16. description:
  17. "Roo Code puts a team of agentic AI assistants directly in your editor, with the power to plan, write, and fix code across multiple files.",
  18. size: "large",
  19. },
  20. {
  21. icon: <FaCode className="h-6 w-6" />,
  22. title: "Multiple Specialized Modes",
  23. description:
  24. "From coding to debugging to architecture, Roo Code has a mode for every dev scenario—just switch on the fly.",
  25. size: "small",
  26. },
  27. {
  28. icon: <FaBrain className="h-6 w-6" />,
  29. title: "Deep Project-wide Context",
  30. description:
  31. "Roo Code reads your entire codebase, preserving valid code through diff-based edits for seamless multi-file refactors.",
  32. size: "small",
  33. },
  34. {
  35. icon: <FaTools className="h-6 w-6" />,
  36. title: "Open-Source and Model-Agnostic",
  37. description:
  38. "Bring your own model or use local AI—no vendor lock-in. Roo Code is free, open, and adaptable to your needs.",
  39. size: "large",
  40. },
  41. {
  42. icon: <FaTerminal className="h-6 w-6" />,
  43. title: "Guarded Command Execution",
  44. description:
  45. "Approve or deny commands as needed. Roo Code automates your dev workflow while keeping oversight firmly in your hands.",
  46. size: "small",
  47. },
  48. {
  49. icon: <FaPuzzlePiece className="h-6 w-6" />,
  50. title: "Fully Customizable",
  51. description:
  52. "Create or tweak modes, define usage rules, and shape Roo Code’s behavior precisely—your code, your way.",
  53. size: "small",
  54. },
  55. {
  56. icon: <FaGlobe className="h-6 w-6" />,
  57. title: "Automated Browser Actions",
  58. description:
  59. "Seamlessly test and verify your web app directly from VS Code—Roo Code can open a browser, run checks, and more.",
  60. size: "small",
  61. },
  62. ]
  63. export function Features() {
  64. const containerVariants = {
  65. hidden: { opacity: 0 },
  66. visible: {
  67. opacity: 1,
  68. transition: {
  69. staggerChildren: 0.15,
  70. delayChildren: 0.3,
  71. },
  72. },
  73. }
  74. const itemVariants = {
  75. hidden: {
  76. opacity: 0,
  77. y: 20,
  78. },
  79. visible: {
  80. opacity: 1,
  81. y: 0,
  82. transition: {
  83. duration: 0.6,
  84. ease: [0.21, 0.45, 0.27, 0.9],
  85. },
  86. },
  87. }
  88. const backgroundVariants = {
  89. hidden: {
  90. opacity: 0,
  91. },
  92. visible: {
  93. opacity: 1,
  94. transition: {
  95. duration: 1.2,
  96. ease: "easeOut",
  97. },
  98. },
  99. }
  100. return (
  101. <section className="relative overflow-hidden border-t border-border py-32">
  102. <motion.div
  103. className="absolute inset-0"
  104. initial="hidden"
  105. whileInView="visible"
  106. viewport={{ once: true }}
  107. variants={backgroundVariants}>
  108. <div className="absolute inset-y-0 left-1/2 h-full w-full max-w-[1200px] -translate-x-1/2">
  109. <div className="absolute left-1/2 top-1/2 h-[800px] w-full -translate-x-1/2 -translate-y-1/2 rounded-[100%] bg-blue-500/10 blur-[120px]" />
  110. </div>
  111. </motion.div>
  112. <div className="container relative z-10 mx-auto px-4 sm:px-6 lg:px-8">
  113. <div className="mx-auto mb-24 max-w-3xl text-center">
  114. <motion.div
  115. initial={{ opacity: 0, y: 20 }}
  116. whileInView={{ opacity: 1, y: 0 }}
  117. viewport={{ once: true }}
  118. transition={{
  119. duration: 0.6,
  120. ease: [0.21, 0.45, 0.27, 0.9],
  121. }}>
  122. <h2 className="bg-gradient-to-b from-foreground to-foreground/70 bg-clip-text text-4xl font-bold tracking-tight text-transparent sm:text-5xl">
  123. Powerful features for modern developers.
  124. </h2>
  125. <p className="mt-6 text-lg text-muted-foreground">
  126. Everything you need to build faster and write better code.
  127. </p>
  128. </motion.div>
  129. </div>
  130. {/* Mobile Carousel */}
  131. <FeaturesMobile />
  132. {/* Desktop Grid */}
  133. <motion.div
  134. className="relative mx-auto hidden max-w-[1200px] md:block"
  135. variants={containerVariants}
  136. initial="hidden"
  137. whileInView="visible"
  138. viewport={{ once: true }}>
  139. <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3 lg:gap-8">
  140. {features.map((feature, index) => (
  141. <motion.div
  142. key={index}
  143. variants={itemVariants}
  144. className={`group relative ${feature.size === "large" ? "lg:col-span-2" : ""} ${index % 2 === 0 ? "lg:translate-y-12" : ""}`}>
  145. <div className="absolute -inset-px rounded-2xl bg-gradient-to-r from-blue-500/30 via-cyan-500/30 to-purple-500/30 opacity-0 blur-sm transition-opacity duration-500 group-hover:opacity-100" />
  146. <div className="relative h-full rounded-2xl border border-border/50 bg-background/30 p-8 backdrop-blur-xl transition-colors duration-300 hover:border-border">
  147. <div className="mb-5 inline-flex items-center justify-center rounded-xl bg-gradient-to-r from-blue-500/5 to-cyan-500/5 p-2.5">
  148. <div className="rounded-lg bg-gradient-to-r from-blue-500/80 to-cyan-500/80 p-2.5">
  149. <div className="text-foreground/90">{feature.icon}</div>
  150. </div>
  151. </div>
  152. <h3 className="mb-3 text-xl font-medium text-foreground/90">{feature.title}</h3>
  153. <p className="leading-relaxed text-muted-foreground">{feature.description}</p>
  154. </div>
  155. </motion.div>
  156. ))}
  157. </div>
  158. </motion.div>
  159. </div>
  160. </section>
  161. )
  162. }