Skip to content

Links to htmx components relevant stuff

Hanne Moa edited this page May 3, 2024 · 13 revisions

Components

  • django-template-partials

  • Slippers

  • django-components

    • Does not live inside apps

    • Puts every component thing into the same folder

      • css
      • templates
      • static files
      • javascript

      Needs its own staticfiles-finder in order to not treat templates as static files

    • Good thing: One tag "component", does not pollute templatetag namespace

    • Can have everyrthing in a single file, in Python

    • Needs updates to STATICFILES_DIRS

    Possibly incompatible with theming since staticfiles/templates cannot be overridden

  • django-web-components

    • No javascript
    • Adds templatetags, adds to syntax
    • Template in separate file by default, can be incorporated directly via render-method
    • Bad thing: pollutes namespace, can clash with existing tags
  • Tetra

    • Puts every component thing into a python class:

      • css
      • templates
      • static files
      • javascript

      While it is possible to also import from files this is not the documented, preferred way.

    • Deeply dependent on alpine.js

    • Rewrites DOM

    • Slow

Examples, patterns, tips

Clone this wiki locally