README.md
# LiveUiKit
<!-- MDOC !-->
[](https://hex.pm/packages/live_ui_kit/)
[](https://hexdocs.pm/live_ui_kit/)
[](https://hex.pm/packages/live_ui_kit)
[](https://github.com/liveuikit/live_ui_kit/blob/master/LICENSE.txt)
[](https://github.com/liveuikit/live_ui_kit/commits/master)
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `live_ui_kit` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:live_ui_kit, "~> 0.1.0"}
]
end
```
Include the library in one of two ways. Either in a specific LiveView file:
```elixir
defmodule ExampleAppWeb.PageLive do
use ExampleAppWeb, :live_view
use LiveUiKit
# Other code
end
```
Or add this to the web module if you want to access it from all LiveView pages:
```elixir
# app/example_app_web.ex
defmodule ExampleAppWeb do
# Other code
defp view_helpers do
quote do
use Phoenix.HTML
import Phoenix.LiveView.Helpers
import Phoenix.View
import ExampleAppWeb.ErrorHelpers
import ExampleAppWeb.Gettext
alias ExampleAppWeb.Router.Helpers, as: Routes
# ADD THIS
use LiveUiKit
end
end
end
```