petal_components 4.16 215 components MIT

The Phoenix UI stack your agent already knows

215 free components, a live playground, an MCP server and a design skill, so Claude Code, Cursor or Codex write Phoenix UI that looks like one product.

Free account, no credit card. Prefer email?

//res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21000 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21006 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21074 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21127 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21264

1.4M Hex downloads · 3,383 developers on Petal

How it works

Set up once. Every screen after that is a prompt.

Petal gives your agent a vocabulary: 215 components on one CSS contract, an MCP server that answers with the installed version's real schemas, and a skill that carries the design rules.

defp deps do
[
{:phoenix, "~> 1.8"},
{:phoenix_live_view, "~> 1.1"},
{:ecto_sql, "~> 3.12"},
{:postgrex, ">= 0.0.0"},
{:petal_components, "~> 4.16"}
]
end
@import "tailwindcss";
@source "../deps/petal_components/**/*.*ex";
@import "../deps/petal_components/assets/default.css";
@import "./colors.css";
def html do
quote do
use Phoenix.Component
use PetalComponents
import MyAppWeb.CoreComponents
end
end
3 files changed +4 −0
1

Add the package

One dependency, two lines of CSS, one use. Tailwind v4 picks up the rest.

Install guide
claude mcp add petal --transport http https://mcp.petal.build/mcp
claude plugin marketplace add petalframework/petal_components
claude plugin install petal-design
// .cursor/mcp.json
{ "mcpServers": { "petal": { "url": "https://mcp.petal.build/mcp" } } }
# ~/.codex/config.toml
[mcp_servers.petal]
url = "https://mcp.petal.build/mcp"
Connected mcp.petal.build exposes three tools
get_install_instructions the install steps, in order
list_components every component, one line each
get_component <name> attrs, slots, defaults, an example
2

Connect your agent

The MCP answers with real attrs, slots and enums for the installed version. The skill loads the design rules only when the agent does UI work.

About the MCP and the skill

Add an invoices table with status filters.

mcp.petal.build
get_component table Complete 0.2s
get_component badge Complete 0.1s
invoices_live.html.heex
<.table rows={@invoices}>
<:col :let={i} label="Invoice">{i.number}</:col>
<:col :let={i} label="Status">
<.badge dot dot_color={i.tone} label={i.status} />
</:col>
<:col :let={i} label="Amount">{i.amount}</:col>
</.table>
3

Ask for a screen

It reads the contracts it needs, then writes HEEx that uses them. No invented Tailwind, no second design system.

Browse the components
Paid
app.cssfrom Get code
:root {
  --pc-radius: 00.375rem0.625rem0.875rem;
  --brand-600: oklch(0.37 0.01 286)oklch(0.54 0.25 293)oklch(0.55 0.22 263)oklch(0.60 0.15 163)oklch(0.77 0.17 71);
  --pc-font-heading: "Inter", sans-serif;
}
4

Dial in the theme

Pick a primary and a radius. Get code hands you the CSS, and every component follows it.

Open the playground

The system

Five pieces, one vocabulary.

petal_components is the source. The playground renders it, the MCP server describes it, the skill carries its rules and Petal Pro builds the SaaS on it. Whichever agent you use reads the same 215 components. Pro is the only paid piece.

  1. petal_components Buttons to data tables on one CSS contract. The source the other four read from. Browse the components 215 components
  2. Playground Primary, radius and font. Get code hands your agent the CSS. Open the playground 3 dials
  3. MCP server mcp.petal.build answers with the installed version's attrs, slots and enums. Connect the MCP 3 tools
  4. petal-design skill The design rules, loaded when the agent does UI work and quiet the rest of the time. Install the skill UI work only
  5. Petal Pro Orgs, billing, auth and admin on the same components. One-time purchase. See Petal Pro 606 projects
1.4M Hex downloads 1k GitHub stars MIT

Around one source

Every piece reads petal_components, so Claude Code, Cursor and Codex learn Petal once and write the same HEEx.

What you get

Less for your agent to guess. Less for you to redo.

Faster to build and cheaper to run. One vocabulary for design and code, a test file behind every component, and apps already running on the same package you install. Thousands of hours saved the old way, and now the tokens too: a screen written against a real schema is written once, not prompted three times.

lightsame HEEx
Ready
darksame HEEx
Ready
<.stepper steps={@steps} size="sm" label_placement="bottom" />

One vocabulary for design and code

The dials your designer sets in the playground are the tokens your agent's HEEx reads. Dark mode, radius, font and primary are one CSS contract, so nothing is styled twice and nothing drifts between the two.

See the theming contract
petal_components · mix test Running Passing
81 modules a test file each LazyHTML Wallaby

Tested before it reaches your app

Every component module ships with its own test file: LazyHTML assertions on the rendered DOM, and a Wallaby accessibility pass when you want it. Your agent inherits a suite it did not have to write.

Read the tests
3,383 developers with a Petal account
//res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21000 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21006 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21074
projects registered
606
apps you can open
19
MIT licensed the code you ship is yours

Proven in production

Thousands of developers hold a Petal account, hundreds of projects have registered as running on it, and the apps in the showcase are open for you to click through. MIT licensed, so the code you ship is yours.

Browse the showcase

PromptAdd a Paid status badge to the invoice row.

Without Petal the agent writes a long block of utility classes for the badge. With Petal it writes one badge tag from the component schema, shown rendered below.

Less to write. Less to redo.

Ask for a status badge without Petal and the agent invents a block of Tailwind it will never write the same way twice. With Petal it reads one schema and writes one line, so the output is shorter and the second screen matches the first.

Connect the MCP

From builders

What people say after the first project.

Real words from developers who shipped on Petal, kept as they wrote them.

I'm going through the @PetalFramework documentation for my 1st project. It is fantastic! The docs cover every available feature. It walks you through the steps to use it for a reminder app. Looks awesome and I still need to dig into the components.
/images/jack-gray.jpeg Jack Gray Author of the Phoenix Deployment Handbook
Petal Pro has been brilliant. I have a couple products in post-wireframe pre-marketing to the general masses and Petal Pro lets me focus on spiking the core functionality without being distracted by fiddly details. And there are a ton of things built in when I decide if/when to take them from spike phase to final product.
/images/randy-schmidt.jpeg Randy Schmidt Web developer and project manager
This has been great. It has allowed us to get off the ground and get funded and has been incredibly valuable, thank you! Will definitely use it on our next project or startup.
/images/paul-mathews.jpg Paul Mathews Shipped a funded startup on Petal Pro
BIG thank you, following a first quick demo today. We were preparing a project kickstart in my company and had less than a month to do it. Thanks to this amazing framework, and a bit of JavaScript charts, we had a standing ovation from the company board.
/images/olivier.jpg Olivier Kickstarted a company project in under a month
Thanks to Petal Pro, I was able to effortlessly build a simple back-office system for my company all on my own. I truly appreciate your work and wanted to express my gratitude.
Hany Built his company's back office on Petal Pro
Just wanted to say that I'm having loads of fun creating something with Pro, thanks for all the work.
/images/maciej.jpeg Maciej Gryka Automating things at RainforestQA

Pricing

The component system is free forever. Petal Pro is a one-time purchase.

The 215 components are MIT, and the playground, the MCP server and the design skill need no account. Petal Pro is the SaaS underneath, bought once, with a year of updates included.

Builder

Free forever

One sign-in, nothing to install, nothing to pay.

Continue with GitHub

Free account, no credit card. Prefer email?

Free without an account: the 215 components, the playground, the MCP server and the design skill.

A free account adds

  • Full source on every docs example
  • A vote on the components roadmap
  • A builder profile
  • Release news by email
Everything in Builder, plus

Every Pro tier includes

  • A year of updates and the latest Pro versions
  • Lifetime access to the projects you create
  • The private Petal Pro GitHub repo
  • A super vote on roadmap features
  • A discounted renewal for another year
  • Full refund within 7 days
  • The Petal Pro Discord channel
  • Customer support

Single Most chosen

$299 one-time

A year of updates included. Another year is $149 when you want it.

Single adds

One project on Petal Pro

Upgrade to Unlimited later.

Buy Single

One payment. No subscription.

Unlimited

$749 one-time

A year of updates included. Another year is $374 when you want it.

Unlimited adds

Unlimited projects on Petal Pro

Upgrade to Business later.

Buy Unlimited

One payment. No subscription.

Business $1,999 one-time, then $999 to renew

Everything in Unlimited, plus sign-in by email domain, up to 5 team members and priority support. Buy Business

Enterprise $9,999 by enquiry

Everything in Business, plus up to 10 team members and 25 hours of dedicated technical support a year. Email us about Enterprise

588 Petal Pro licences since 2022 606 projects registered Full refund within 7 days

Questions

Before you sign in, the usual questions.

More on the terms and the licence lives on the pricing page.

Why buy this when my agent can build it?

Because it can build it four different ways, and it will. The expensive part of software was never the typing. It is deciding how a thing should work and holding that decision steady across months of features. Petal Pro is the decisions: multi-tenancy, billing, auth, orgs, admin and background jobs, made once and written down where your agent looks before it writes. You keep using your agent. It builds on rails instead of from scratch.

What does a free account give me?

The full source behind every docs example, a vote on the components roadmap, a builder profile and release news by email. The components, the playground, the MCP server and the design skill all work without one.

Do I need Petal Pro to use the components?

No. The components are MIT licensed and install as a Hex dependency in any Phoenix app, new or existing. Petal Pro is a separate product: the application underneath, with auth, orgs, billing, admin and deployment already built and documented for your agent.

What does a Petal Pro purchase include?

A year of updates and access to the private repository. When the year ends you keep every version released during it, and you keep the projects you built. Renewing for another year costs less than the first purchase.

Can I ship what I build with it?

Yes, on commercial work and client work. The one limit is that you cannot use Petal Pro to build something that competes with Petal, and you cannot republish the source. The full terms are in the licence.

What if it turns out not to be for me?

Email us within 7 days and we refund in full, no questions asked.

The stack your agent already knows. One free account away.

One sign-in, nothing to install. What a free account gets you today:

  • Full source on every docs example
  • A vote on the components roadmap
  • A builder profile
  • Release news by email

Free account, no credit card. Prefer email?

//res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21000 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21006 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21074 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21127 //res.cloudinary.com/wickedsites/image/upload/c_fill,g_face,h_64,w_64/petal_marketing/prod/avatars/21264

3,383 developers on Petal 1.4M Hex downloads 606 projects registered