Collection of helpers to generate and manipulate Web Component.
Although this project was originally extracted from Phoenix, it does not depend on Phoenix and can be used with any Plug application (or even without Plug).
See the docs for more information.
About at Web Component
Add deps in mix.exs
{:phoenix_webcomponent, "~> 2.0"},
Include in phoenix view helpers
defp view_helpers do
quote do
# import all helper functions
use Phoenix.WebComponent
# or
use Phoenix.WebComponent, :alias
...
end
end
Include javascript
import 'phoenix_webcomponent';
By default, javascirpt is at priv/static/phoenix_webcomponent.js
and bundle all packages.
If you wannt better javascript bundle, you can use npm version.
npm install phoenix_webcomponent
- wc_appbar
- wc_markdown
- wc_pagination
- wc_table