Skip to main content
Glama
template.tsx.j22.32 kB
{/* chuk-motion/src/chuk_motion/components/layouts/Vertical/template.tsx.j2 */} import React from 'react'; import { AbsoluteFill, useCurrentFrame } from 'remotion'; interface VerticalProps { top?: React.ReactNode; bottom?: React.ReactNode; startFrame: number; durationInFrames: number; layout_style?: string; top_ratio?: number; padding?: number; gap?: number; border_width?: number; border_color?: string; border_radius?: number; } export const Vertical: React.FC<VerticalProps> = ({ top, bottom, startFrame, durationInFrames, layout_style = 'top-bottom', top_ratio = 50, padding = parseInt('[[ spacing.spacing.xl ]]'), gap = parseInt('[[ spacing.spacing.md ]]'), border_width, border_color = '[[ colors.border.light ]]', border_radius = parseInt('[[ spacing.border_radius.md ]]') }) => { const frame = useCurrentFrame(); if (frame < startFrame || frame >= startFrame + durationInFrames) { return null; } const bottom_ratio = 100 - top_ratio; return ( <AbsoluteFill style={{ pointerEvents: 'none' }}> <div style={{ position: 'absolute', top: padding, left: padding, right: padding, bottom: padding, display: 'flex', flexDirection: 'column', gap: gap, width: `calc(100% - ${padding * 2}px)`, height: `calc(100% - ${padding * 2}px)`, }} > {top && ( <div style={{ width: '100%', height: `${top_ratio}%`, display: 'flex', overflow: 'hidden', position: 'relative', ...(border_width && { border: `${border_width}px solid ${border_color}`, borderRadius: border_radius }), }}> {top} </div> )} {bottom && ( <div style={{ width: '100%', height: `${bottom_ratio}%`, display: 'flex', overflow: 'hidden', position: 'relative', ...(border_width && { border: `${border_width}px solid ${border_color}`, borderRadius: border_radius }), }}> {bottom} </div> )} </div> </AbsoluteFill> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrishayuk/chuk-mcp-remotion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server