Generators & Page Builder
Last updated
Was this helpful?
Last updated
Was this helpful?
This produces the same files as Phoenix's mix phx.gen.live
(). The only difference is that the templates use Tailwind and Petal Components. You can try it out with:
Add the routes from the output.
Example:
Usually, when you want to create a new page, you would have to create a new template file or live view file. Then you would create a route and point it either to the template's corresponding controller action, or directly to the live view.
To skip these steps, we made it so if you navigate to a path with no route on it then it will show what we call "The Page Builder" 👏. The Page Builder is simply a form that helps you construct a page at that route. Submitting the form will result in the route being automatically added to the router.ex
file and either a template or live view file is created for you.
Same file output as phx.gen.html
(), but uses Petal Components and a layout from Pro.
The same as but designed for Petal Pro.