Class: PhlexKit::Skeleton

Inherits:
BaseComponent show all
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

Methods inherited from BaseComponent

#on

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_templateObject



7
# File 'app/components/phlex_kit/skeleton/skeleton.rb', line 7

def view_template(&) = div(**mix({ class: "pk-skeleton" }, @attrs), &)