
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
shadcn_phlexcomponents
Advanced tools
A modern UI component library for Ruby on Rails applications, built with Phlex and styled with Tailwind CSS. Inspired by shadcn/ui, this gem provides beautiful, accessible, and highly customizable components for Ruby developers.
Install gem and required gems:
bundle add shadcn_phlexcomponents phlex-rails tailwindcss-rails \
tailwind_merge lucide-rails class_variants
Or install it yourself as:
gem "shadcn_phlexcomponents"
gem "phlex-rails", "~> 2.1"
gem "tailwindcss-rails", "~> 4.2"
gem "tailwind_merge", "~> 1.0"
gem "lucide-rails", "~> 0.5.1"
gem "class_variants", "~> 1.1"
After installing the gems, run the installer to set up the necessary files:
rails install:shadcn_phlexcomponents
This will:
vendor/shadcn_phlexcomponents/components
vendor/shadcn_phlexcomponents/javascript
vendor/shadcn_phlexcomponents/stylesheets
config/initializers/shadcn_phlexcomponents.rb
rails upgrade:shadcn_phlexcomponents
This will:
vendor/shadcn_phlexcomponents/components
vendor/shadcn_phlexcomponents/javascript
vendor/shadcn_phlexcomponents/stylesheets
<%= render Button.new { "Default" } %>
See https://shadcn-phlexcomponents.seanysx.com/ for more examples.
Please follow instructions in https://github.com/sean-yeoh/shadcn_phlexcomponents_demo to setup a rails app locally.
Configure default component styles in an initializer:
# config/initializers/shadcn_phlexcomponents.rb
ShadcnPhlexcomponents.configure do |config|
config.button = {
base: "custom-base-classes",
variants: {
variant: {
primary: "bg-blue-600 text-white hover:bg-blue-700",
secondary: "bg-gray-200 text-gray-900 hover:bg-gray-300"
}
}
}
end
Components automatically adapt to dark mode using Tailwind's dark:
classes.
Components work with Rails form helpers:
<%= render Form.new(model: @user, class: "space-y-6") do |f| %>
<%= f.input(:email) %>
<%= f.submit %>
<% end %>
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
When creating new components:
ShadcnPhlexcomponents::Base
class_variants
for styling variations# Run tests
rake test
# Run linting
rake rubocop
rubocop
# Install JavaScript dependencies
yarn install
git checkout -b my-new-feature
)rake test
)rake rubocop
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that shadcn_phlexcomponents demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.