Guillotine (guillotine v0.3.0)

Fully accessible unstyled Phoenix components.

Table of Contents

Installation

First, add guillotine to the list of dependencies in your mix.exs:

def deps do
  [
    {:guillotine, "~> 0.1.0"}
  ]
end

Guillotine relies heavily on Phoenix hooks that need to be added to your JavaScript bundle.

If you use the default esbuild setup that comes with Phoenix, just head to your app.js and add the hooks:

import { Hooks } from "guillotine";

let liveSocket = new LiveSocket("/live", Socket, {
  hooks: {
    ...Hooks
  },
});

If you have a more advanced setup for your assets and use a package manager, install the phoenix-guillotine package and import the hooks from there:

npm install phoenix-guillotine
import { Hooks } from "phoenix-guillotine";

let liveSocket = new LiveSocket("/live", Socket, {
  hooks: {
    ...Hooks
  },
});