From 9f891453d53b7acabf750af01bf92ea2cb2e1882 Mon Sep 17 00:00:00 2001 From: vb8448 <84413102+vb8448@users.noreply.github.com> Date: Sun, 24 Nov 2024 11:26:38 +0100 Subject: [PATCH] Update README.md (#766) Updated documentation for dynamic components. Close #764 . --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index caa8534a..62b9daa6 100644 --- a/README.md +++ b/README.md @@ -1085,6 +1085,20 @@ Instead, you can use **dynamic components**. Dynamic components are used in plac {% endcomponent %} ``` +or in case you use the `django_components.component_shorthand_formatter` tag formatter: + +```django +{% dynamic is=component_name title="Cat Museu" %} + {% fill "content" %} + HELLO_FROM_SLOT_1 + {% endfill %} + {% fill "sidebar" %} + HELLO_FROM_SLOT_2 + {% endfill %} +{% enddynamic %} +``` + + These behave same way as regular components. You pass it the same args, kwargs, and slots as you would to the component that you want to render.