Class: PhlexKit::Skeleton
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::Skeleton
- Defined in:
- app/components/phlex_kit/skeleton/skeleton.rb
Overview
Placeholder shimmer for loading content. Ported from ruby_ui's RubyUI::Skeleton
(Tailwind animate-pulse rounded-md bg-primary/10 → vanilla .pk-skeleton).
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ Skeleton
constructor
A new instance of Skeleton.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ Skeleton
Returns a new instance of Skeleton.
5 |
# File 'app/components/phlex_kit/skeleton/skeleton.rb', line 5 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
7 |
# File 'app/components/phlex_kit/skeleton/skeleton.rb', line 7 def view_template(&) = div(**mix({ class: "pk-skeleton" }, @attrs), &) |