Empower customization by overriding default styles and classes, allowing tailored design modifications to suit specific UI requirements.
Component's Style & Class:
@@ -608,7 +675,7 @@
-
+
Use BitButton in right-to-left (RTL).
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.cs
index df7e4544f6..a53ad46010 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.cs
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.cs
@@ -125,11 +125,20 @@ public partial class BitButtonDemo
Description = "The value of the href attribute of the link rendered by the button. If provided, the component will be rendered as an anchor tag instead of button.",
},
new()
+ {
+ Name = "Icon",
+ Type = "BitIconInfo?",
+ DefaultValue = "null",
+ Description = "Gets or sets the icon to display using custom CSS classes for external icon libraries. Takes precedence over IconName when both are set.",
+ LinkType = LinkType.Link,
+ Href = "#bit-icon-info",
+ },
+ new()
{
Name = "IconName",
Type = "string?",
DefaultValue = "null",
- Description = "The name of the icon to render inside the button."
+ Description = "The name of the icon to render inside the button from the built-in Fluent UI icons."
},
new()
{
@@ -334,7 +343,36 @@ public partial class BitButtonDemo
Description = "Custom CSS classes/styles for the loading label section of the BitButton."
},
]
- }
+ },
+ new()
+ {
+ Id = "bit-icon-info",
+ Title = "BitIconInfo",
+ Parameters =
+ [
+ new()
+ {
+ Name = "Name",
+ Type = "string?",
+ DefaultValue = "null",
+ Description = "Gets or sets the name of the icon."
+ },
+ new()
+ {
+ Name = "BaseClass",
+ Type = "string?",
+ DefaultValue = "null",
+ Description = "Gets or sets the base CSS class for the icon. For built-in Fluent UI icons, this defaults to \"bit-icon\". For external icon libraries like FontAwesome, you might set this to \"fa\" or leave empty."
+ },
+ new()
+ {
+ Name = "Prefix",
+ Type = "string?",
+ DefaultValue = "null",
+ Description = "Gets or sets the CSS class prefix used before the icon name. For built-in Fluent UI icons, this defaults to \"bit-icon--\". For external icon libraries, you might set this to \"fa-\" or leave empty."
+ },
+ ]
+ },
];
private readonly List componentSubEnums =
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.samples.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.samples.cs
index bc24f418cf..0dc74da841 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.samples.cs
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/Button/BitButtonDemo.razor.samples.cs
@@ -518,6 +518,44 @@ private async Task LoadingTemplateClick()
TertiaryBorder";
private readonly string example17RazorCode = @"
+
+
+
+ House (Icon=""@@(""fa-solid fa-house"")"")
+
+
+
+ Heart (Icon=""@@BitIconInfo.Css(""fa-solid fa-heart"")"")
+
+
+
+ GitHub (Icon=""@@BitIconInfo.Fa(""brands github"")"")
+
+
+
+ Rocket (Icon=""@@BitIconInfo.Fa(""solid rocket"")"")
+
+
+
+
+
+
+ House (Icon=""@@(""bi bi-house-fill"")"")
+
+
+
+ Heart (Icon=""@@BitIconInfo.Css(""bi bi-heart-fill"")"")
+
+
+
+ GitHub (Icon=""@@BitIconInfo.Bi(""github"")"")
+
+
+
+ Gear (Icon=""@@BitIconInfo.Bi(""gear-fill"")"")
+";
+
+ private readonly string example18RazorCode = @"