SkeletonLoadingRectangleContentComponent

InfoGeneratePackages

The provided Ruby code defines a class named `SkeletonRectangleWithContentComponent`, which is a subclass of `ApplicationComponent`. This class is designed to render a specific graphical component within a web application. The `template` method within the class constructs a vertical stack of div elements with predefined sizes using CSS classes to represent a visual placeholder, commonly used during content loading phases. This stack consists of a larger rectangle followed by three smaller rectangles, all of which mimic the structure of a content block (e.g., an image followed by lines of text) with skeleton loading effects. The `skeleton` CSS class likely indicates a loading animation effect to visually indicate that the content is being loaded. This component aids in improving user experience by providing a visual cue during data loading times.

# frozen_string_literal: true

class SkeletonRectangleWithContentComponent < ApplicationComponent
  def template
    div(class: "flex flex-col gap-4 w-52") do
      div(class: "skeleton h-32 w-full")
      div(class: "skeleton h-4 w-28")
      div(class: "skeleton h-4 w-full")
      div(class: "skeleton h-4 w-full")
    end
  end
end