Skeleton
Use to show a placeholder while content is loading.
Usage
Example
Installation
Components
Component | Built using | Source |
---|---|---|
Skeleton | Phlex |
Use to show a placeholder while content is loading.
div(class: "flex items-center space-x-4") do Skeleton(class: "h-12 w-12 rounded-full") div(class: "space-y-2") do Skeleton(class: "h-4 w-[250px]") Skeleton(class: "h-4 w-[200px]") end end
Run the install command
rails g ruby_ui:component Skeleton
1
Add RubyUI::Skeleton
to app/components/ruby_ui/skeleton.rb
# frozen_string_literal: true module RubyUI class Skeleton < Base def view_template(&) div(**attrs, &) end private def default_attrs { class: "animate-pulse rounded-md bg-primary/10" } end end end
Component | Built using | Source |
---|---|---|
Skeleton | Phlex |