Skip to main content

components

                            
                              
                                import
                                
                                {
                                ...
                                }
                                
                                from
                                
                                "@motion-canvas/2d/lib/components"
                                ;
                                

Classes

  • Circle
  • Grid
  • Icon
  • Img
  • Latex
  • Layout
  • Line
  • Node
  • Polygon
  • Rect
  • Shape
  • Txt
  • Video
  • View2D

Interfaces

  • CircleProps
  • FunctionComponent
  • GridProps
  • IconProps
  • ImgProps
  • JSXProps
  • LatexProps
  • LayoutProps
  • LineProps
  • NodeConstructor
  • NodeProps
  • PolygonProps
  • RectProps
  • ShapeProps
  • TxtProps
  • VideoProps

Type Aliases

ComponentChild

                            
                              
                                type 
                                ComponentChild
                                 = 
                                
                                  
                                    
                                      Node
                                    
                                    
                                      object
                                    
                                    
                                      string
                                    
                                    
                                      number
                                    
                                    
                                      bigint
                                    
                                    
                                      boolean
                                    
                                    
                                      null
                                    
                                    
                                      undefined
                                    
                                  
                                
                              
                              

ComponentChildren

                            
                              
                                type 
                                ComponentChildren
                                 = 
                                
                                  
                                    
                                      ComponentChild
                                    
                                    
                                      ComponentChild
                                      []
                                    
                                  
                                
                              
                              

NodeChildren

                            
                              
                                type 
                                NodeChildren
                                 = 
                                
                                  
                                    
                                      Node
                                    
                                    
                                      Node
                                      []
                                    
                                  
                                
                              
                              

NodeState

                            
                              
                                type 
                                NodeState
                                 = 
                                
                                  
                                    
                                      NodeProps
                                    
                                    
                                      Record
                                      
                                        
                                          
                                            string
                                          
                                          
                                            any
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

PropsOf

                            
                              
                                type 
                                PropsOf
                                
                                  
                                    
                                      T
                                    
                                  
                                
                                 = 
                                T
                                 extends 
                                NodeConstructor
                                
                                  
                                    
                                      infer 
                                      P
                                    
                                  
                                
                                 ? 
                                P
                                 : 
                                T
                                 extends 
                                FunctionComponent
                                
                                  
                                    
                                      infer 
                                      P
                                    
                                  
                                
                                 ? 
                                P
                                 : 
                                never
                              
                              

Type Parameters