File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,44 @@ a Turbo Frame, and retrieve the ID of this frame::
250
250
}
251
251
}
252
252
253
+ <twig:Turbo: Frame> Twig Component
254
+ ^^^^^^^^^^^^^
255
+
256
+ .. versionadded :: 2.22
257
+
258
+ The `<twig:Turbo:Frame> ` Twig Component was added in Turbo 2.22.
259
+
260
+ Simple example:
261
+
262
+ .. code-block :: html+twig
263
+
264
+ <twig:Turbo: Frame id="the_frame_id" />
265
+
266
+ {# renders as: #}
267
+ <turbo-frame id="the_frame_id"></turbo-frame>
268
+
269
+ With a HTML attribute:
270
+
271
+ .. code-block :: html+twig
272
+
273
+ <twig:Turbo: Frame id="the_frame_id" loading="lazy" src="{{ path('block') }}" />
274
+
275
+ {# renders as: #}
276
+ <turbo-frame id="the_frame_id" loading="lazy" src="https://example.com/block"></turbo-frame>
277
+
278
+ With content:
279
+
280
+ .. code-block :: html+twig
281
+
282
+ <twig:Turbo: Frame id="the_frame_id" src="{{ path('block') }}">
283
+ A placeholder.
284
+ </twig:Turbo: Frame>
285
+
286
+ {# renders as: #}
287
+ <turbo-frame id="the_frame_id" src="https://example.com/block">
288
+ A placeholder.
289
+ </turbo-frame>
290
+
253
291
Writing Tests
254
292
^^^^^^^^^^^^^
255
293
You can’t perform that action at this time.
0 commit comments