@@ -19,7 +19,6 @@ import { GithubIcon } from '~/components/icons/GithubIcon'
1919import { LazyLandingCommunitySection } from '~/components/LazyLandingCommunitySection'
2020import { LazySponsorSection } from '~/components/LazySponsorSection'
2121import { LibraryDownloadsMicro } from '~/components/LibraryDownloadsMicro'
22- import { LibraryStatsSection } from '~/components/LibraryStatsSection'
2322import { LibraryWordmark } from '~/components/LibraryWordmark'
2423import LandingPageGad from '~/components/LandingPageGad'
2524import { getLibrary } from '~/libraries'
@@ -270,10 +269,6 @@ export default function CliLanding({
270269 { landingCodeExampleRsc }
271270 </ div >
272271 </ div >
273-
274- < div className = "mx-auto w-full max-w-[80rem] px-4 pb-12 xl:max-w-[92rem]" >
275- < LibraryStatsSection library = { library } />
276- </ div >
277272 </ section >
278273
279274 < section className = "bg-white py-12 dark:bg-zinc-950" >
@@ -322,6 +317,13 @@ export default function CliLanding({
322317}
323318
324319function CliWorkbenchPanel ( ) {
320+ const [ activeCommandIndex , setActiveCommandIndex ] = React . useState ( 0 )
321+ const activeCommand = commandRows [ activeCommandIndex ] ?? commandRows [ 0 ]
322+ const activeCommandPreview = `npx @tanstack/cli ${ activeCommand [ 0 ] . replace (
323+ ' ' ,
324+ '-' ,
325+ ) } "${ activeCommand [ 1 ] } "`
326+
325327 return (
326328 < div className = "w-full min-w-0 max-w-full overflow-hidden rounded-lg border border-indigo-200 bg-white p-4 shadow-sm shadow-indigo-950/5 dark:border-indigo-900 dark:bg-zinc-950" >
327329 < div className = "flex items-center justify-between gap-3" >
@@ -339,23 +341,36 @@ function CliWorkbenchPanel() {
339341 < p className = "font-mono leading-6" >
340342 npx @tanstack/cli mcp
341343 < br />
342- npx @tanstack/cli add auth database deploy
344+ { activeCommandPreview }
343345 < br />
344346 npx @tanstack/cli build-plan
345347 </ p >
346348 </ div >
347349
348350 < div className = "mt-4 grid gap-3 md:grid-cols-2" >
349- { commandRows . map ( ( [ label , value ] ) => (
350- < div
351+ { commandRows . map ( ( [ label , value ] , index ) => (
352+ < button
351353 key = { label }
352- className = "rounded-lg border border-zinc-200 bg-indigo-50 p-4 dark:border-zinc-800 dark:bg-indigo-950/20"
354+ aria-pressed = { activeCommandIndex === index }
355+ className = {
356+ activeCommandIndex === index
357+ ? 'rounded-lg border border-indigo-500 bg-indigo-500 p-4 text-left text-white'
358+ : 'rounded-lg border border-zinc-200 bg-indigo-50 p-4 text-left transition-colors hover:border-indigo-300 dark:border-zinc-800 dark:bg-indigo-950/20 dark:hover:border-indigo-800'
359+ }
360+ type = "button"
361+ onClick = { ( ) => setActiveCommandIndex ( index ) }
353362 >
354- < p className = "text-[0.65rem] font-black uppercase text-indigo-700 dark:text-indigo-300" >
363+ < p
364+ className = {
365+ activeCommandIndex === index
366+ ? 'text-[0.65rem] font-black uppercase text-white/75'
367+ : 'text-[0.65rem] font-black uppercase text-indigo-700 dark:text-indigo-300'
368+ }
369+ >
355370 { label }
356371 </ p >
357372 < p className = "mt-2 text-sm font-bold leading-6" > { value } </ p >
358- </ div >
373+ </ button >
359374 ) ) }
360375 </ div >
361376 </ div >
0 commit comments