Filled
Strongest visual weight. Solid background with high-contrast text. Use for primary actions and key information.
Foundations
Every visual component supports three variants -- Filled, Outlined, and Text -- that control visual weight, background, border, and text color. This page explains how the variant system works, how CSS classes are resolved, and when to use each variant.
The variant system defines three levels of visual emphasis. Each variant maps to a distinct combination of surface, border, and text styling resolved through the ColorPalette.
Strongest visual weight. Solid background with high-contrast text. Use for primary actions and key information.
Medium visual weight. Subtle background tint with a colored border. Use for secondary actions.
Minimal visual presence. Transparent background with a bottom border line. Use for tertiary or inline actions.
The same component rendered in all three variants demonstrates the visual weight difference. Filled draws the most attention, Outlined sits in the middle, and Text recedes into the background.
Compare the visual weight of the same Button component across Filled, Outlined, and Text variants.
<Button Text="Primary Action" Variant="Variant.Filled" Color="Color.Primary" />
<Button Text="Secondary Action" Variant="Variant.Outlined" Color="Color.Primary" />
<Button Text="Tertiary Action" Variant="Variant.Text" Color="Color.Primary" />All 11 colors rendered in each of the 3 variants. This matrix shows the 33 possible combinations and helps verify that every color token works correctly across all variants.
| Color | Filled | Outlined | Text |
|---|---|---|---|
| Primary | Primary | Primary | Primary |
| Secondary | Secondary | Secondary | Secondary |
| Light | Light | Light | Light |
| Dark | Dark | Dark | Dark |
| Neutral | Neutral | Neutral | Neutral |
| Disabled | Disabled | Disabled | Disabled |
| Info | Info | Info | Info |
| Warning | Warning | Warning | Warning |
| Error | Error | Error | Error |
| Success | Success | Success | Success |
| Link | Link | Link | Link |
| Bg | Bg | Bg | Bg |
| Panel | Panel | Panel | Panel |
| PanelMuted | PanelMuted | PanelMuted | PanelMuted |
| Hero | Hero | Hero | Hero |
@foreach (var color in Enum.GetValues<Color>())
{
<Chip Text="@color.ToString()" Color="@color" Variant="Variant.Filled" />
<Chip Text="@color.ToString()" Color="@color" Variant="Variant.Outlined" />
<Chip Text="@color.ToString()" Color="@color" Variant="Variant.Text" />
}ComponentStyleHelper provides three methods that resolve a Variant + Color pair into Tailwind CSS classes. Each method delegates to the ColorPaletteRegistry to look up the correct palette entry.
Returns the background CSS class. Filled uses a solid color surface, Outlined uses a subtle tinted surface, and Text is always transparent.
| Variant | Resolved CSS Class |
|---|---|
| Filled | bg-[var(--ui-color-primary-filled-bg)] |
| Outlined | bg-[var(--ui-color-primary-outlined-bg)] |
| Text | bg-transparent |
// Returns the background CSS class for the given variant and color
var bg = ComponentStyleHelper.GetVariantSurfaceClass(Variant.Filled, Color.Primary);
// Filled → palette.SurfaceFilled (e.g. "bg-primary-600 dark:bg-primary-500")
// Outlined → palette.SurfaceOutlined (e.g. "bg-primary-50/60 dark:bg-primary-950/40")
// Text → "bg-transparent"Returns the border CSS class. Each variant resolves to a different border style: Filled uses a same-tone border, Outlined uses a visible colored border, and Text uses a bottom-only underline border.
| Variant | Resolved CSS Class |
|---|---|
| Filled | border-[var(--ui-color-primary-filled-border)] |
| Outlined | border-[var(--ui-color-primary-outlined-border)] |
| Text | border-[var(--ui-color-primary-text-border)] |
// Returns the border CSS class for the given variant and color
var border = ComponentStyleHelper.GetVariantBorderClass(Variant.Outlined, Color.Primary);
// Filled → palette.BorderFilled
// Outlined → palette.BorderOutlined
// Text → palette.BorderLineReturns the text color CSS class. Filled uses TextOnFilled (light text on dark background), while Outlined and Text both use TextOnOutlinedOrText (dark text on light background).
| Variant | Resolved CSS Class |
|---|---|
| Filled | text-[color:var(--ui-color-primary-filled-text)] |
| Outlined | text-[color:var(--ui-color-primary-outlined-text)] |
| Text | text-[color:var(--ui-color-primary-outlined-text)] |
// Returns the text color CSS class for the given variant and color
var text = ComponentStyleHelper.GetVariantTextClass(Variant.Filled, Color.Primary);
// Filled → palette.TextOnFilled (light text on dark bg)
// Outlined → palette.TextOnOutlinedOrText (dark text on light bg)
// Text → palette.TextOnOutlinedOrTextChoose the variant based on the action's importance in the visual hierarchy. A single view should typically use only one Filled element as the primary call-to-action.
Primary CTA
Use Filled for the single most important action on the page. Examples: "Save", "Submit", "Create New". Limit to one per visible area to maintain clear hierarchy.
Secondary Actions
Use Outlined for supporting actions that complement the primary CTA. Examples: "Cancel", "Edit", "Filter". Provides enough emphasis without competing with the Filled button.
Tertiary / Inline Actions
Use Text for low-emphasis actions, navigation links, or inline controls. Examples: "Learn more", "View all", toolbar actions. Minimizes visual noise in dense interfaces.
Key source files that implement the variant system in Sillium.Core.Blazor.
| File | Purpose |
|---|---|
| Models/Variant.cs | Variant enum definition (Filled, Outlined, Text) |
| Helpers/ComponentStyleHelper.cs | CSS class resolution methods for surface, border, and text color per variant |
| Internal/ColorPalette.cs | Color palette providing variant-specific CSS class sets for all 11 colors |