New plugin: PostHTML Components #389
Replies: 1 comment 1 reply
-
Just an update. I am creating components for Bootstrap first of all for testing the posthtml-components plugin as many things come out when you start to solve certain situation; but it could also become a complete Boostrap UI to be used in any project based on Bootstrap. I choose Bootstrap because it has free and open source ready to use components, while for example with Tailwind UI it's not the case. But I would like also make one for Tailwind UI since I am using it, but for now only with Vue/React. Bootstrap UI repo https://github.com/thewebartisan7/posthtml-bootstrap-ui And check also the starter template for quick get started https://github.com/thewebartisan7/posthtml-bootstrap-ui-starter |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I would like to share a new plugin for PostHTML similar to posthtml-extends and posthtml-modules, inspired by Laravel Blade, see here:
https://www.npmjs.com/package/posthtml-component
The logic is a bit different and can be simplified with below code:
Which is pretty similar to what posthtml-modules is doing, but with this you can nest your component like below:
See here all features https://github.com/thewebartisan7/posthtml-components#features
And examples: https://github.com/thewebartisan7/posthtml-components/tree/main/examples
You can run
npm run build-examples
and check output inexamples/dist
folder.One of the best feature is the tag
<x-tag>
without specify the path to filename.It's still in early stage, so please to give it a try and let me know your feedback, or any issues you may found.
I am trying to make it compatible with existing markup used by posthtml-extends and posthtml-modules, but in case you can just keep them together and progressively start to migrate to new one.
Looking for to hear from you!
Beta Was this translation helpful? Give feedback.
All reactions