{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "marker-highlight", "title": "Marker Highlight", "description": "Colored marker block draws behind a phrase as the text color shifts.", "dependencies": [ "remotion" ], "files": [ { "path": "registry/remocn/marker-highlight/index.tsx", "content": "\"use client\";\n\nimport {\n interpolate,\n interpolateColors,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface MarkerHighlightProps {\n before?: string;\n highlight: string;\n after?: string;\n markerColor?: string;\n baseColor?: string;\n highlightedTextColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MarkerHighlight({\n before = \"\",\n highlight,\n after = \"\",\n markerColor = \"#facc15\",\n baseColor = \"#171717\",\n highlightedTextColor = \"#171717\",\n fontSize = 72,\n fontWeight = 600,\n speed = 1,\n className,\n}: MarkerHighlightProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const markerScale = spring({\n frame: frame - 15,\n fps,\n config: { damping: 14 },\n });\n\n const textColor = interpolateColors(\n interpolate(markerScale, [0.5, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n [0, 1],\n [baseColor, highlightedTextColor],\n );\n\n return (\n