@@ -107,7 +107,7 @@ class PageTitle(BaseModel, extra='forbid'):
107107class Div (BaseModel , defer_build = True , extra = 'forbid' ):
108108 """A generic container component."""
109109
110- components : '_t.List [AnyComponent]'
110+ components : 'list [AnyComponent]'
111111 """List of components to render inside the div."""
112112
113113 class_name : _class_name .ClassNameField = None
@@ -120,7 +120,7 @@ class Div(BaseModel, defer_build=True, extra='forbid'):
120120class Page (BaseModel , defer_build = True , extra = 'forbid' ):
121121 """Similar to `container` in many UI frameworks, this acts as a root component for most pages."""
122122
123- components : '_t.List [AnyComponent]'
123+ components : 'list [AnyComponent]'
124124 """List of components to render on the page."""
125125
126126 class_name : _class_name .ClassNameField = None
@@ -245,7 +245,7 @@ class Button(BaseModel, extra='forbid'):
245245class Link (BaseModel , defer_build = True , extra = 'forbid' ):
246246 """Link component."""
247247
248- components : '_t.List [AnyComponent]'
248+ components : 'list [AnyComponent]'
249249 """List of components to render attached to the link."""
250250
251251 on_click : _t .Union [events .AnyEvent , None ] = None
@@ -270,7 +270,7 @@ class Link(BaseModel, defer_build=True, extra='forbid'):
270270class LinkList (BaseModel , extra = 'forbid' ):
271271 """List of Link components."""
272272
273- links : _t . List [Link ]
273+ links : list [Link ]
274274 """List of links to render."""
275275
276276 mode : _t .Union [_t .Literal ['tabs' , 'vertical' , 'pagination' ], None ] = None
@@ -292,10 +292,10 @@ class Navbar(BaseModel, extra='forbid'):
292292 title_event : _t .Union [events .AnyEvent , None ] = None
293293 """Optional event to trigger when the title is clicked. Often used to navigate to the home page."""
294294
295- start_links : _t . List [Link ] = []
295+ start_links : list [Link ] = []
296296 """List of links to render at the start of the navbar."""
297297
298- end_links : _t . List [Link ] = []
298+ end_links : list [Link ] = []
299299 """List of links to render at the end of the navbar."""
300300
301301 class_name : _class_name .ClassNameField = None
@@ -318,7 +318,7 @@ def __get_pydantic_json_schema__(
318318class Footer (BaseModel , extra = 'forbid' ):
319319 """Footer component."""
320320
321- links : _t . List [Link ]
321+ links : list [Link ]
322322 """List of links to render in the footer."""
323323
324324 extra_text : _t .Union [str , None ] = None
@@ -337,10 +337,10 @@ class Modal(BaseModel, defer_build=True, extra='forbid'):
337337 title : str
338338 """The text displayed on the modal trigger button."""
339339
340- body : '_t.List [AnyComponent]'
340+ body : 'list [AnyComponent]'
341341 """List of components to render in the modal body."""
342342
343- footer : '_t.Union[_t.List [AnyComponent], None]' = None
343+ footer : '_t.Union[list [AnyComponent], None]' = None
344344 """Optional list of components to render in the modal footer."""
345345
346346 open_trigger : _t .Union [events .PageEvent , None ] = None
@@ -365,7 +365,7 @@ class ServerLoad(BaseModel, defer_build=True, extra='forbid'):
365365 load_trigger : _t .Union [events .PageEvent , None ] = None
366366 """Optional event to trigger when the component is loaded."""
367367
368- components : '_t.Union[_t.List [AnyComponent], None]' = None
368+ components : '_t.Union[list [AnyComponent], None]' = None
369369 """Optional list of components to render while the server is loading the new component(s)."""
370370
371371 sse : _t .Union [bool , None ] = None
@@ -457,7 +457,7 @@ class Iframe(BaseModel, extra='forbid'):
457457class Video (BaseModel , extra = 'forbid' ):
458458 """Video component that displays a video or multiple videos."""
459459
460- sources : _t . List [_p .AnyUrl ]
460+ sources : list [_p .AnyUrl ]
461461 """List of URLs to the video sources."""
462462
463463 autoplay : _t .Union [bool , None ] = None
@@ -549,7 +549,7 @@ class Toast(BaseModel, defer_build=True, extra='forbid'):
549549 title : str
550550 """The title of the toast."""
551551
552- body : '_t.List [AnyComponent]'
552+ body : 'list [AnyComponent]'
553553 """List of components to render in the toast body."""
554554
555555 # TODO: change these before the release (top left, center, end, etc). Can be done with the toast bug fix.
0 commit comments