Placeholder
TsgcHTMLComponent_Placeholder — render a Bootstrap 5 skeleton loading card with a shimmer animation and configurable lines, image, title and buttons, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_Placeholder — render a Bootstrap 5 skeleton loading card with a shimmer animation and configurable lines, image, title and buttons, in Delphi, C++ Builder and .NET.
A skeleton-loader component that emits Bootstrap 5 placeholder markup with a glow or wave shimmer. Set the line count and which parts to show, then read the HTML property — or call the static BuildCard / BuildText helpers.
TsgcHTMLComponent_Placeholder
Bootstrap 5 placeholder markup
Delphi, C++ Builder, .NET
Call BuildCard(lineCount, animation) for a full skeleton card, or create the component, set LineCount, ShowImage and Animation, then read HTML.
uses
sgcHTML_Enums, sgcHTML_Component_Placeholder;
// One-line static helper (primary form):
var
vHTML: string;
begin
vHTML := TsgcHTMLComponent_Placeholder.BuildCard(3, paWave);
WebModule.Response := vHTML;
end;
// Or configure it fully:
var
oPH: TsgcHTMLComponent_Placeholder;
begin
oPH := TsgcHTMLComponent_Placeholder.Create(nil);
try
oPH.LineCount := 4;
oPH.Animation := paGlow;
oPH.Color := hcSecondary;
oPH.ShowImage := True;
oPH.ShowTitle := True;
oPH.ShowButtons := True;
WebModule.Response := oPH.HTML; // Bootstrap placeholder card
finally
oPH.Free;
end;
end;
// includes: sgcHTML_Enums.hpp, sgcHTML_Component_Placeholder.hpp
// One-line static helper (primary form):
String html = TsgcHTMLComponent_Placeholder::BuildCard(3, paWave);
// Or configure it fully:
TsgcHTMLComponent_Placeholder *oPH = new TsgcHTMLComponent_Placeholder(NULL);
try
{
oPH->LineCount = 4;
oPH->Animation = paGlow;
oPH->Color = hcSecondary;
oPH->ShowImage = true;
oPH->ShowTitle = true;
oPH->ShowButtons = true;
String body = oPH->HTML; // Bootstrap placeholder card
}
__finally
{
delete oPH;
}
using esegece.sgcWebSockets;
// One-line static helper (primary form):
string html = TsgcHTMLComponent_Placeholder.BuildCard(3,
TsgcHTMLPlaceholderAnimation.paWave);
// Or configure it fully:
var ph = new TsgcHTMLComponent_Placeholder();
ph.LineCount = 4;
ph.Animation = TsgcHTMLPlaceholderAnimation.paGlow;
ph.Color = TsgcHTMLColor.hcSecondary;
ph.ShowImage = true;
ph.ShowTitle = true;
ph.ShowButtons = true;
string body = ph.HTML; // Bootstrap placeholder card
The members you reach for most often.
LineCount sets how many placeholder text lines render (default 3) at varied widths to mimic real copy.
Animation selects paGlow or paWave shimmer via TsgcHTMLPlaceholderAnimation.
ShowImage adds an image block, ShowTitle a title bar and ShowButtons two button placeholders.
Size sets the placeholder height with phSmall, phNormal, phLarge or phExtraLarge; Color takes a TsgcHTMLColor.
BuildCard(lineCount, animation) returns a full skeleton card; BuildText(lineCount, animation) just text lines; BuildButton(animation) a single button.
HTML returns the complete Bootstrap placeholder card — swap it for the real content once your data has loaded.