API Reference
Document
Represents an HTML document.
Inheritance
- Element
- Document
Constructors
Methods
public Boolean AddLibrary(Library library) #BooleanAdds a predefined library.
Parameters
- library HtmlForgeX.Libraries
- Library identifier.
public Void AddLibrary(Libraries library, Byte weight) #VoidAdds a predefined library with a custom load order weight.
Parameters
- library HtmlForgeX.Libraries
- Library identifier.
- weight System.Byte
- Ordering weight. Lower values load first.
AddLibrary(HtmlForgeX.Library library) #Adds a custom library definition.
Parameters
- library HtmlForgeX.Library
- Library to add.
Returns
true if the library was added successfully; otherwise false.
Finalize() #Finalizer to ensure resources are released.
FinalRegistrationPass() #Final registration pass to ensure all elements with Document references register their libraries
FinalRegistrationPassForElement(HtmlForgeX.Element element) #Recursively forces library registration for all elements in the tree
Parameters
- element HtmlForgeX.Element
- The element to process.
RegisterAllLibraries() #Recursively registers libraries from all elements in the document.
RegisterLibraries() #RegisterLibrariesFromElement(HtmlForgeX.Element element) #Recursively registers libraries from an element and all its children.
Parameters
- element HtmlForgeX.Element
- The element to process.
public Void Save(String path, Boolean openInBrowser = false, String scriptPath = null, String stylePath = null) #VoidSaves the document to disk.
Parameters
- path System.String
- File path.
- openInBrowser System.Boolean = false
- Whether to open the file after saving.
- scriptPath System.String = null
- Optional scripts path.
- stylePath System.String = null
- Optional styles path.
public async Task SaveAsync(String path, Boolean openInBrowser = false, String scriptPath = null, String stylePath = null, CancellationToken cancellationToken = null) #TaskSaves the document to disk asynchronously.
Parameters
- path System.String
- File path.
- openInBrowser System.Boolean = false
- Whether to open the file after saving.
- scriptPath System.String = null
- Optional scripts path.
- stylePath System.String = null
- Optional styles path.
- cancellationToken System.Threading.CancellationToken = null
- Token used to cancel the operation.
public Document SetSmartTabCssVar(String name, String value) #DocumentSets a document-wide SmartTab CSS variable (e.g., "--st-anchor-active-primary-color").
Parameters
- name System.String
- value System.String
public Document SetSmartTabThemeColors(String activePrimary = null, String activeSecondary = null, String defaultPrimary = null, String defaultSecondary = null, String borderColor = null, String background = null) #DocumentConvenience to set common SmartTab theme colors globally.
Parameters
- activePrimary System.String = null
- activeSecondary System.String = null
- defaultPrimary System.String = null
- defaultSecondary System.String = null
- borderColor System.String = null
- background System.String = null
public Document Settings(Action<DocumentSettings> configure) #DocumentOpens a settings scope for this document to configure advanced behaviors.
Parameters
- configure System.Action{HtmlForgeX.DocumentSettings}
public override String ToString() #StringReturns the complete HTML representation of this document.
Returns
Complete HTML document as a string.
public Document WithSurfaceAccentColor(TablerColor color) #DocumentSets the document-wide accent color used by surfaced shells and inheriting dashboard primitives.
Parameters
- color HtmlForgeX.TablerColor
public Document WithSurfaceAccentIntensity(TablerSurfaceAccentIntensity intensity) #DocumentSets the document-wide surface accent intensity for surfaced shells.
Parameters
- intensity HtmlForgeX.TablerSurfaceAccentIntensity
public Document WithSurfaceDensity(TablerSurfaceDensity density) #DocumentSets the document-wide surface density for surfaced shells.
Parameters
- density HtmlForgeX.TablerSurfaceDensity
public Document WithSurfaceRadius(TablerSurfaceRadius radius) #DocumentSets the document-wide surface radius for surfaced shells.
Parameters
- radius HtmlForgeX.TablerSurfaceRadius
public Document WithSurfaceStyle(TablerSurfaceStyle style) #DocumentSets a document-wide surface style shared by cards, headers, sidebars, and menus.
Parameters
- style HtmlForgeX.TablerSurfaceStyle
Inherited Methods
public TablerAccordion Accordion(Action<TablerAccordion> config) #TablerAccordionParameters
- config Action<TablerAccordion>
public TablerActionsAndNotesCard ActionsAndNotesCard(Action<TablerActionsAndNotesCard> config) #TablerActionsAndNotesCardParameters
- config Action<TablerActionsAndNotesCard>
public TablerActionSummaryCard ActionSummaryCard(Action<TablerActionSummaryCard> config) #TablerActionSummaryCardParameters
- config Action<TablerActionSummaryCard>
public TablerActivityFeedCard ActivityFeedCard(Action<TablerActivityFeedCard> config) #TablerActivityFeedCardParameters
- config Action<TablerActivityFeedCard>
public override Element Add(Element element) #ElementParameters
- element Element
public TablerAlert Alert(String title, String message, TablerColor alertColor = Default, TablerAlertType alertType = Regular) #TablerAlertParameters
- title String
- message String
- alertColor TablerColor = Default
- alertType TablerAlertType = Regular
public TablerAnalyticsSummaryCard AnalyticsSummaryCard(Action<TablerAnalyticsSummaryCard> config) #TablerAnalyticsSummaryCardParameters
- config Action<TablerAnalyticsSummaryCard>
public ApexCharts ApexChart(Action<ApexCharts> config) #ApexChartsParameters
- config Action<ApexCharts>
public TablerApexChartCard ApexChartCard(Action<TablerApexChartCard> config) #TablerApexChartCardParameters
- config Action<TablerApexChartCard>
public TablerAuditLogCard AuditLogCard(Action<TablerAuditLogCard> config) #TablerAuditLogCardParameters
- config Action<TablerAuditLogCard>
public TablerAvatar Avatar() #TablerAvatarParameters
- config Action<TablerAvatar>
public TablerAvatarGroup AvatarGroup(Action<TablerAvatarGroup> config) #TablerAvatarGroupParameters
- config Action<TablerAvatarGroup>
public TablerBadge Badge(String text, TablerBadgeColor color, TablerBadgeVisualStyle style, TablerBadgeSize size, Boolean pill = true, String href = null) #TablerBadgeParameters
- text String
- color TablerBadgeColor = null
public TablerBadgeSpan BadgeSpan(String text, TablerColor color = Blue) #TablerBadgeSpanParameters
- text String
- color TablerColor = Blue
public TablerBadgeStatus BadgeStatus(String text, TablerColor color) #TablerBadgeStatusParameters
- text String
- color TablerColor
public TablerBreakdownCard BreakdownCard(Action<TablerBreakdownCard> config) #TablerBreakdownCardParameters
- config Action<TablerBreakdownCard>
public TablerButton Button(String text, TablerButtonVariant variant = Primary) #TablerButtonParameters
- text String
- config Action<TablerButton> = Primary
public TablerCalendarWorkspaceCard CalendarWorkspaceCard(Action<TablerCalendarWorkspaceCard> config) #TablerCalendarWorkspaceCardParameters
- config Action<TablerCalendarWorkspaceCard>
public TablerCard Card(Int32 count, Action<TablerCard> config) #TablerCardParameters
- config Action<TablerCard>
public TablerCardBasic CardBasic(String title, String text) #TablerCardBasicParameters
- title String
- text String
public TablerCarousel Carousel(Action<TablerCarousel> config) #TablerCarouselParameters
- config Action<TablerCarousel>
public TablerCategoryBarChartCard CategoryBarChartCard(Action<TablerCategoryBarChartCard> config) #TablerCategoryBarChartCardParameters
- config Action<TablerCategoryBarChartCard>
public ChartJs ChartJs(Action<ChartJs> config) #ChartJsParameters
- config Action<ChartJs>
public TablerColumn Column(TablerColumnNumber number, Action<TablerColumn> config) #TablerColumnParameters
- config Action<TablerColumn>
public TablerControlBar ControlBar(Action<TablerControlBar> config) #TablerControlBarParameters
- config Action<TablerControlBar>
public TablerCookieBanner CookieBanner(Action<TablerCookieBanner> config) #TablerCookieBannerParameters
- config Action<TablerCookieBanner>
public TablerCountdown Countdown(Action<TablerCountdown> config = null) #TablerCountdownParameters
- config Action<TablerCountdown> = null
public TablerCountUp CountUp(Action<TablerCountUp> config) #TablerCountUpParameters
- config Action<TablerCountUp>
public TablerDataGrid DataGrid(Action<TablerDataGrid> config) #TablerDataGridParameters
- config Action<TablerDataGrid>
public TablerDataGridCard DataGridCard(Action<TablerDataGridCard> config) #TablerDataGridCardParameters
- config Action<TablerDataGridCard>
public TablerDataTableCard DataTableCard(Action<TablerDataTableCard> config) #TablerDataTableCardParameters
- config Action<TablerDataTableCard>
public VisNetwork DiagramNetwork(Action<VisNetwork> config) #VisNetworkParameters
- config Action<VisNetwork>
public TablerDistributionCard DistributionCard(Action<TablerDistributionCard> config) #TablerDistributionCardParameters
- config Action<TablerDistributionCard>
public HtmlTag Div(Action<HtmlTag> config) #HtmlTagParameters
- config Action<HtmlTag>
public TablerEmptyState EmptyState(Action<TablerEmptyState> config) #TablerEmptyStateParameters
- config Action<TablerEmptyState>
public TablerEmptyStateCard EmptyStateCard(Action<TablerEmptyStateCard> config) #TablerEmptyStateCardParameters
- config Action<TablerEmptyStateCard>
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
public FancyTree FancyTree(Action<FancyTree> config) #FancyTreeParameters
- config Action<FancyTree>
public TablerFlagIcon Flag(Country country) #TablerFlagIconParameters
- iso2 String
public TablerFlagList Flags(Action<TablerFlagList> config) #TablerFlagListParameters
- config Action<TablerFlagList>
public TablerForm Form(Action<TablerForm> config) #TablerFormParameters
- config Action<TablerForm>
public FullCalendar FullCalendar(Action<FullCalendar> config) #FullCalendarParameters
- config Action<FullCalendar>
public TablerGaugeCard GaugeCard(Action<TablerGaugeCard> config) #TablerGaugeCardParameters
- config Action<TablerGaugeCard>
public TablerGeoSummaryCard GeoSummaryCard(Action<TablerGeoSummaryCard> config) #TablerGeoSummaryCardParameters
- config Action<TablerGeoSummaryCard>
public HeaderLevel HeaderLevel(HeaderLevelTag level, String text) #HeaderLevelParameters
- level HeaderLevelTag
- text String
public TablerHeroCard HeroCard(Action<TablerHeroCard> config) #TablerHeroCardParameters
- config Action<TablerHeroCard>
public TablerHighlightCard HighlightCard(Action<TablerHighlightCard> config) #TablerHighlightCardParameters
- config Action<TablerHighlightCard>
public TablerIconElement Icon(TablerIconType icon, Action<TablerIconElement> config) #TablerIconElementParameters
- icon FontAwesomeSolid
- config Action<FontAwesomeIcon> = null
public TablerIconFont IconFont(TablerIconType icon) #TablerIconFontParameters
- icon String
public TablerIncidentTimelineCard IncidentTimelineCard(Action<TablerIncidentTimelineCard> config) #TablerIncidentTimelineCardParameters
- config Action<TablerIncidentTimelineCard>
public TablerInsightSummaryCard InsightSummaryCard(Action<TablerInsightSummaryCard> config) #TablerInsightSummaryCardParameters
- config Action<TablerInsightSummaryCard>
public TablerLightboxGallery LightboxGallery(Action<TablerLightboxGallery> config) #TablerLightboxGalleryParameters
- config Action<TablerLightboxGallery>
public TablerLineComparisonCard LineComparisonCard(Action<TablerLineComparisonCard> config) #TablerLineComparisonCardParameters
- config Action<TablerLineComparisonCard>
public TablerButton LinkButton(String text, String href, TablerButtonVariant variant = Primary) #TablerButtonParameters
- text String
- href String
- variant TablerButtonVariant = Primary
public TablerListCard ListCard(Action<TablerListCard> config) #TablerListCardParameters
- config Action<TablerListCard>
public TablerListGroup ListGroup(Action<TablerListGroup> config) #TablerListGroupParameters
- config Action<TablerListGroup>
public TablerLogs Logs(List<String> code, RGBColor backgroundColor, RGBColor textColor) #TablerLogsParameters
- code String
- theme TablerLogsTheme = Dark
- backgroundClass String = null
- textClass String = null
public TablerMapSummaryCard MapSummaryCard(Action<TablerMapSummaryCard> config) #TablerMapSummaryCardParameters
- config Action<TablerMapSummaryCard>
public TablerMetricCard MetricCard(Action<TablerMetricCard> config) #TablerMetricCardParameters
- config Action<TablerMetricCard>
public TablerModal Modal(Action<TablerModal> config) #TablerModalParameters
- config Action<TablerModal>
public TablerNarrativeCard NarrativeCard(Action<TablerNarrativeCard> config) #TablerNarrativeCardParameters
- config Action<TablerNarrativeCard>
public TablerNarrativeSummaryCard NarrativeSummaryCard(Action<TablerNarrativeSummaryCard> config) #TablerNarrativeSummaryCardParameters
- config Action<TablerNarrativeSummaryCard>
public TablerPageHeader PageHeader(Action<TablerPageHeader> config) #TablerPageHeaderParameters
- config Action<TablerPageHeader>
public TablerPeopleReviewCard PeopleReviewCard(Action<TablerPeopleReviewCard> config) #TablerPeopleReviewCardParameters
- config Action<TablerPeopleReviewCard>
public TablerPlaceholder Placeholder(Action<TablerPlaceholder> config) #TablerPlaceholderParameters
- config Action<TablerPlaceholder>
public TablerPlaceholderCard PlaceholderCard(Action<TablerPlaceholderCard> config) #TablerPlaceholderCardParameters
- config Action<TablerPlaceholderCard>
public TablerPlaceholderContainer Placeholders(Action<TablerPlaceholderContainer> config) #TablerPlaceholderContainerParameters
- config Action<TablerPlaceholderContainer>
public TablerPresenceListCard PresenceListCard(Action<TablerPresenceListCard> config) #TablerPresenceListCardParameters
- config Action<TablerPresenceListCard>
public TablerProgressBar ProgressBar(TablerProgressBarType type, Int32 percentage, Nullable<TablerColor> tablerBackground = null) #TablerProgressBarParameters
- config Action<TablerProgressBar>
public TablerProgressListCard ProgressListCard(Action<TablerProgressListCard> config) #TablerProgressListCardParameters
- config Action<TablerProgressListCard>
public EasyQRCodeElement QRCode(String text) #EasyQRCodeElementParameters
- text String
public QuillEditor QuillEditor(Action<QuillEditor> config = null) #QuillEditorParameters
- config Action<QuillEditor> = null
public TablerReviewListCard ReviewListCard(Action<TablerReviewListCard> config) #TablerReviewListCardParameters
- config Action<TablerReviewListCard>
public TablerRow Row(Action<TablerRow> config) #TablerRowParameters
- config Action<TablerRow>
public TablerScheduleSummaryCard ScheduleSummaryCard(Action<TablerScheduleSummaryCard> config) #TablerScheduleSummaryCardParameters
- config Action<TablerScheduleSummaryCard>
public ScrollingText ScrollingText(Action<ScrollingText> config) #ScrollingTextParameters
- config Action<ScrollingText>
public TablerScrollSpy ScrollSpy(Action<TablerScrollSpy> config) #TablerScrollSpyParameters
- config Action<TablerScrollSpy>
public SmartTab SmartTab(Action<SmartTab> config) #SmartTabParameters
- config Action<SmartTab>
public SmartWizard SmartWizard(Action<SmartWizard> config) #SmartWizardParameters
- config Action<SmartWizard>
public TablerSocialTileCard SocialTileCard(Action<TablerSocialTileCard> config) #TablerSocialTileCardParameters
- config Action<TablerSocialTileCard>
public Span Span(String content = "") #SpanParameters
- content String = ""
public TablerSparkline Sparkline(Action<TablerSparkline> config) #TablerSparklineParameters
- config Action<TablerSparkline>
public TablerSpinner Spinner(Action<TablerSpinner> config) #TablerSpinnerParameters
- config Action<TablerSpinner>
public TablerStatTileCard StatTileCard(Action<TablerStatTileCard> config) #TablerStatTileCardParameters
- config Action<TablerStatTileCard>
public TablerStatusIndicator StatusIndicator(Action<TablerStatusIndicator> config) #TablerStatusIndicatorParameters
- config Action<TablerStatusIndicator>
public TablerStatusStrip StatusStrip(Action<TablerStatusStrip> config) #TablerStatusStripParameters
- config Action<TablerStatusStrip>
public TablerSummaryStrip SummaryStrip(Action<TablerSummaryStrip> config) #TablerSummaryStripParameters
- config Action<TablerSummaryStrip>
public Table Table(Object objects, TableType tableType) #TableParameters
- objects IEnumerable<Object>
- tableType TableType
public TablerInput TablerInput(String name, Action<TablerInput> config = null) #TablerInputParameters
- name String
- config Action<TablerInput> = null
public TablerProgressBar TablerProgress(Action<TablerProgressBar> config) #TablerProgressBarParameters
- config Action<TablerProgressBar>
public TablerSelect TablerSelect(String name, Action<TablerSelect> config = null) #TablerSelectParameters
- name String
- config Action<TablerSelect> = null
public TablerSteps TablerSteps(Action<TablerSteps> config) #TablerStepsParameters
- config Action<TablerSteps>
public TablerTextarea TablerTextarea(String name, Action<TablerTextarea> config = null) #TablerTextareaParameters
- name String
- config Action<TablerTextarea> = null
public TablerTableSummaryCard TableSummaryCard(Action<TablerTableSummaryCard> config) #TablerTableSummaryCardParameters
- config Action<TablerTableSummaryCard>
public TablerTabs Tabs(Action<TablerTabs> config) #TablerTabsParameters
- config Action<TablerTabs>
public TablerTags Tags(Action<TablerTags> config) #TablerTagsParameters
- config Action<TablerTags>
public TablerTaskList Tasks(Action<TablerTaskList> config) #TablerTaskListParameters
- config Action<TablerTaskList>
public TablerText Text() #TablerTextParameters
- content String
- color RGBColor = null
- fontSize String = null
public TablerTimeline Timeline(Action<TablerTimeline> config) #TablerTimelineParameters
- config Action<TablerTimeline>
public TablerTimelineSummaryCard TimelineSummaryCard(Action<TablerTimelineSummaryCard> config) #TablerTimelineSummaryCardParameters
- config Action<TablerTimelineSummaryCard>
public TablerToast Toast(Action<TablerToast> config) #TablerToastParameters
- title String
- message String
- type TablerToastType = Default
public TablerTrackingSummaryCard TrackingSummaryCard(Action<TablerTrackingSummaryCard> config) #TablerTrackingSummaryCardParameters
- config Action<TablerTrackingSummaryCard>
public TablerVectorMapCard VectorMapCard(Action<TablerVectorMapCard> config) #TablerVectorMapCardParameters
- config Action<TablerVectorMapCard>
public TablerWorkflowStepsCard WorkflowStepsCard(Action<TablerWorkflowStepsCard> config) #TablerWorkflowStepsCardParameters
- config Action<TablerWorkflowStepsCard>
public TablerWorkflowSummaryCard WorkflowSummaryCard(Action<TablerWorkflowSummaryCard> config) #TablerWorkflowSummaryCardParameters
- config Action<TablerWorkflowSummaryCard>
Properties
public DocumentConfiguration Configuration { get; } #Configuration and state for this document instance.
public LibraryMode LibraryMode { get; set; } #Gets or sets how external libraries are loaded.
public ThemeMode ThemeMode { get; set; } #Gets or sets the initial theme mode.
public HfxThemeVariant LightThemeVariant { get; set; } #Gets or sets the default light theme variant used when ThemeMode resolves to light.
public HfxThemeVariant DarkThemeVariant { get; set; } #Gets or sets the default dark theme variant used when ThemeMode resolves to dark.
public HfxThemeAccessibility ThemeAccessibility { get; set; } #Gets or sets accessibility overrides for contrast/palette adjustments.
public String Language { get; set; } #Gets or sets the language for the root <html> element (default: "en"). Set to null/empty to omit the attribute.
public Boolean AutoStackColumns { get; set; } #Controls whether columns automatically stack their direct children using Bootstrap vstack. Default is true.
public Boolean AutoStackPages { get; set; } #Controls whether pages that render children directly (without rows) are wrapped in a vstack with a gap. Default is true.
public TablerSpacing DefaultStackGap { get; set; } #Sets the default gap scale used for automatic stacks (columns/pages). Maps to Bootstrap's gap-* utilities; typical values 0..5.
public TablerSpacing InnerStackGap { get; set; } #Sets the default inner gap scale used for closely related items within a block (e.g., header→content). Components may rely on this to avoid overly loose internal spacing while keeping inter-block rhythm.
public Boolean EnableTextBlockSpacing { get; set; } #Enables a default bottom margin on Tabler text blocks to keep paragraphs comfortably spaced without specifying mb-* everywhere. Default: true.
public TablerSpacing TextBlockSpacing { get; set; } #Sets the default text block spacing scale used when EnableTextBlockSpacing is enabled. Maps to mb-*.
public String Path { get; set; } #Gets or sets the output path used when saving the document.
public String StylePath { get; set; } #Gets or sets the default style output path.
public String ScriptPath { get; set; } #Gets or sets the default script output path.