API Reference
Span
Represents a <span> element with configurable styling options. The Span class exposes helper methods for applying common CSS attributes without manually managing the underlying style collection.
Inheritance
- Element
- Span
Constructors
Methods
public Span AddColoredText(String text, RGBColor color) #SpanAdds colored text to the parent. This creates a new span for the text and returns the parent span for chaining.
Parameters
- text System.String
- The text content.
- color HtmlForgeX.RGBColor
- The text color.
Returns
The parent span for method chaining.
public virtual Span AddContent(String content) #SpanAdds content as a child of the current span and returns a wrapper for styling.
Parameters
- content System.String
- The text to add as a new Span.
Returns
A wrapper span used for method chaining.
public Span AddStyledText(String text, RGBColor color = null, String fontSize = null, Nullable<FontWeight> fontWeight = null) #SpanAdds styled text to the parent. This creates a new span for the text and returns the parent span for chaining.
Parameters
- text System.String
- The text content.
- color HtmlForgeX.RGBColor = null
- Optional text color.
- fontSize System.String = null
- Optional font size.
- fontWeight System.Nullable{HtmlForgeX.FontWeight} = null
- Optional font weight.
Returns
The parent span for method chaining.
public virtual Span AppendContent(String content) #SpanAppends new content to the current span while keeping styling in the parent chain.
Parameters
- content System.String
- Text or HTML to append.
Returns
Wrapper span allowing further configuration.
public String GenerateClasses() #StringBuilds the CSS class string based on assigned Tabler properties.
Returns
Combined CSS class string.
public String GenerateStyle() #StringBuilds the style attribute string based on assigned properties.
Returns
Combined CSS style string.
public override String ToString() #StringRenders the span as an HTML string including any chained spans.
Returns
HTML markup representing the span.
public virtual Span WithAlignment(Alignment alignment) #SpanSets the text alignment.
Parameters
- alignment HtmlForgeX.Alignment
- Alignment value.
Returns
The current span instance.
public virtual Span WithBackgroundColor(RGBColor backgroundColor) #SpanSets the background color for the span.
Parameters
- backgroundColor HtmlForgeX.RGBColor
- Color to assign.
Returns
The current span instance.
public virtual Span WithColor(TablerColor color) #SpanSets the text color for the span.
Parameters
- color HtmlForgeX.RGBColor
- Color to assign.
Returns
The current span instance.
WithColor(HtmlForgeX.TablerColor color) #Sets the Tabler color class for the span.
Parameters
- color HtmlForgeX.TablerColor
- Tabler color value.
Returns
The current span instance.
public virtual Span WithDirection(Direction direction) #SpanSets the text direction.
Parameters
- direction HtmlForgeX.Direction
- Direction value.
Returns
The current span instance.
public virtual Span WithDisplay(Display display) #SpanSets the display style of the span.
Parameters
- display HtmlForgeX.Display
- Display value.
Returns
The current span instance.
public virtual Span WithFontFamily(String fontFamily) #SpanSets the font family.
Parameters
- fontFamily System.String
- Font family name.
Returns
The current span instance.
public virtual Span WithFontSize(String fontSize) #SpanSets the CSS font-size value.
Parameters
- fontSize System.String
- Font size string.
Returns
The current span instance.
public virtual Span WithFontStyle(FontStyle fontStyle) #SpanSets the font style.
Parameters
- fontStyle HtmlForgeX.FontStyle
- Style value.
Returns
The current span instance.
public virtual Span WithFontVariant(FontVariant fontVariant) #SpanSets the font variant.
Parameters
- fontVariant HtmlForgeX.FontVariant
- Variant value.
Returns
The current span instance.
public virtual Span WithFontWeight(TablerFontWeight weight) #SpanSets the font weight.
Parameters
- fontWeight HtmlForgeX.FontWeight
- Weight value.
Returns
The current span instance.
WithFontWeight(HtmlForgeX.TablerFontWeight weight) #Sets the Tabler font weight for the span.
Parameters
- weight HtmlForgeX.TablerFontWeight
- Tabler font weight value.
Returns
The current span instance.
public virtual Span WithLineHeight(String lineHeight) #SpanSets the CSS line-height value.
Parameters
- lineHeight System.String
- Line height string.
Returns
The current span instance.
public virtual Span WithOpacity(Nullable<Double> opacity) #SpanSets the opacity of the span.
Parameters
- opacity System.Nullable{System.Double}
- Opacity value.
Returns
The current span instance.
public virtual Span WithTextDecoration(TextDecoration textDecoration) #SpanSets the text decoration.
Parameters
- textDecoration HtmlForgeX.TextDecoration
- Decoration value.
Returns
The current span instance.
public virtual Span WithTextTransform(TextTransform textTransform) #SpanSets the text transform property.
Parameters
- textTransform HtmlForgeX.TextTransform
- Transform value.
Returns
The current span instance.
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) #ElementAdds a new child Span with the specified content.
Parameters
- content System.String
- The text content for the new span.
Returns
The created child Span.
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>