diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor index a85f72fa66..db6c3d369e 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor @@ -13,6 +13,8 @@ ComponentPublicMembers="componentPublicMembers"> +
Basic usage examples of BitOtpInput, including different lengths, disabled state, and autofocus.
+
Basic
@@ -31,6 +33,8 @@ +
Set different input types for the OTP input: text, number, and password.
+
Text
@@ -46,6 +50,8 @@ +
Demonstrating various layout directions for BitOtpInput: default, reversed, vertical, and reversed vertical.
+
Default
@@ -64,24 +70,32 @@ +
Explore styling and class customization for BitOtpInput, including component styles, custom classes, and detailed styles.
+

-
Component's Style & Class:
- +
Component's Style & Class:

+



-
Styles & Classes:
- +
Styles & Classes:

+
- +
+
Examples of one-way and two-way data binding with BitOtpInput.
+
One-way
@@ -96,6 +110,8 @@ +
Handle various events in BitOtpInput, including change, fill, focus, input, keydown, and paste events.
+
OnChange
@@ -135,6 +151,8 @@ +
Use data annotations to validate the OTP input component in a form submission scenario.
+
@if (formIsValidSubmit is false) { @@ -161,7 +179,9 @@ -
+
Use the BitOtpInput component in a right-to-left (RTL).
+
+
Default

diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.cs index fd280b295b..134bcbb949 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.cs @@ -228,23 +228,45 @@ private void HandleInvalidSubmit() private readonly string example4RazorCode = @" - + + + - -"; + + + +"; private readonly string example5RazorCode = @" diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.scss b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.scss index 13609c2691..8d5484a217 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.scss +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/OtpInput/BitOtpInputDemo.razor.scss @@ -1,27 +1,38 @@ -.example-box { +@import '../../../../Styles/abstracts/_bit-css-variables.scss'; + +.example-box { display: flex; - max-width: max-content; + align-items: flex-start; flex-flow: column nowrap; - - .lbl { - margin-bottom: 0.25rem; - } } ::deep { .custom-class { - padding: 1rem; - max-width: max-content; - background-color: lightskyblue; + gap: 1rem; + margin-inline: 1rem; + } + + .custom-class input { + border-radius: 0; + border-width: 0 0 1px 0; + border-color: lightseagreen; + } + + .custom-root { + margin-inline: 1rem; } .custom-input { border-radius: 50%; - border: 1px solid red; + border: 1px solid tomato; + } + + .custom-focused { + border-color: red; box-shadow: tomato 0 0 1rem; } .validation-message { - color: red; + color: $bit-color-error; } }