feat(ui): add fluid section motion and interaction polish

This commit is contained in:
2026-11-03 18:22:51 +05:30
parent e7aa732892
commit 561718870b
3 changed files with 75 additions and 1 deletions
+10 -1
View File
@@ -26,6 +26,7 @@ import { WorkflowVisualizerSection } from './WorkflowVisualizerSection';
import { VerticalToolStackSection } from './VerticalToolStackSection';
import { MajorToolBannersSection } from './MajorToolBannersSection';
import { CinematicHorizontalScrollSection } from './CinematicHorizontalScrollSection';
import { SectionEntrance } from '@/components/ui/SectionEntrance';
interface SectionRendererProps {
section: SectionConfig;
@@ -45,7 +46,15 @@ interface SectionRendererProps {
};
}
export function SectionRenderer({ section, context }: SectionRendererProps) {
export function SectionRenderer(props: SectionRendererProps) {
return (
<SectionEntrance id={props.section.id}>
<SectionContent {...props} />
</SectionEntrance>
);
}
function SectionContent({ section, context }: SectionRendererProps) {
const locale = context.locale || 'en';
// Visibility Check (PRD §5.2, §5.3 CFG-09)
+20
View File
@@ -0,0 +1,20 @@
'use client';
import { motion, useReducedMotion } from 'framer-motion';
/** Subtle, viewport-triggered entrance shared by every JSON-driven page section. */
export function SectionEntrance({ children, id }: { children: React.ReactNode; id: string }) {
const reduceMotion = useReducedMotion();
return (
<motion.div
data-section-entrance={id}
initial={reduceMotion ? false : { opacity: 0, y: 22, filter: 'blur(5px)' }}
whileInView={{ opacity: 1, y: 0, filter: 'blur(0px)' }}
viewport={{ once: true, amount: 0.12, margin: '0px 0px -48px 0px' }}
transition={{ duration: 0.65, ease: [0.22, 1, 0.36, 1] }}
>
{children}
</motion.div>
);
}