|
| 1 | +--- |
| 2 | +title: Appearance |
| 3 | +page_title: OTPInput Appearance |
| 4 | +description: "Learn how to apply different styling options to the OTPInput control." |
| 5 | +slug: otpinput/appearance |
| 6 | +tags: otpInput,appearance |
| 7 | +published: True |
| 8 | +position: 2 |
| 9 | +--- |
| 10 | + |
| 11 | +# Appearance |
| 12 | + |
| 13 | +In this article, you will find information about the styling options and rendering of the WebForms OTPInput. |
| 14 | + |
| 15 | +For a live example, visit the [Appearance Demo of the OTPInput](https://demos.telerik.com/aspnet-ajax/otpinput/appearance/defaultcs.aspx). |
| 16 | + |
| 17 | +## Options |
| 18 | + |
| 19 | +The WebForms OTPInput supports the following styling options: |
| 20 | + |
| 21 | +- [`Size`](#size) - configures the overall size of the component. |
| 22 | +- [`FillMode`](#fillmode) - configures how the color is applied to the component. |
| 23 | +- [`Rounded`](#rounded) - configures the border radius of the component. |
| 24 | + |
| 25 | +### Size |
| 26 | + |
| 27 | +The `Size` option controls how big or small the items of the OTPInput look. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +The following values are available for the [Size]({%slug otpinput/server-side-programming/enums#otpinputsize%}) option: |
| 32 | + |
| 33 | +- `Small` |
| 34 | +- `Medium` (Default) |
| 35 | +- `Large` |
| 36 | +- `None` |
| 37 | + |
| 38 | +Example |
| 39 | + |
| 40 | +````ASP.NET |
| 41 | +<telerik:RadOTPInput ID="RadOTPInput1" runat="server" Size="Small" Separator="-"> |
| 42 | + <ItemsCollection> |
| 43 | + <telerik:OTPInputItem GroupLength="3" /> |
| 44 | + <telerik:OTPInputItem GroupLength="3" /> |
| 45 | + </ItemsCollection> |
| 46 | +</telerik:RadOTPInput> |
| 47 | +
|
| 48 | +<telerik:RadOTPInput ID="RadOTPInput2" runat="server" Size="Medium" Separator="-"> |
| 49 | + <ItemsCollection> |
| 50 | + <telerik:OTPInputItem GroupLength="3" /> |
| 51 | + <telerik:OTPInputItem GroupLength="3" /> |
| 52 | + </ItemsCollection> |
| 53 | +</telerik:RadOTPInput> |
| 54 | +
|
| 55 | +<telerik:RadOTPInput ID="RadOTPInput3" runat="server" Size="Large" Separator="-"> |
| 56 | + <ItemsCollection> |
| 57 | + <telerik:OTPInputItem GroupLength="3" /> |
| 58 | + <telerik:OTPInputItem GroupLength="3" /> |
| 59 | + </ItemsCollection> |
| 60 | +</telerik:RadOTPInput> |
| 61 | +
|
| 62 | +<telerik:RadOTPInput ID="RadOTPInput4" runat="server" Size="None" Separator="-"> |
| 63 | + <ItemsCollection> |
| 64 | + <telerik:OTPInputItem GroupLength="3" /> |
| 65 | + <telerik:OTPInputItem GroupLength="3" /> |
| 66 | + </ItemsCollection> |
| 67 | +</telerik:RadOTPInput> |
| 68 | +```` |
| 69 | + |
| 70 | +### Rounded |
| 71 | + |
| 72 | +The `Rounded` option controls the border radius of the rendered `input` elements. |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +The following values are available for the [Rounded]({%slug otpinput/server-side-programming/enums#otpinputrounded%}) option: |
| 77 | + |
| 78 | +- `Small` |
| 79 | +- `Mediun` (Default) |
| 80 | +- `Large` |
| 81 | +- `Full` |
| 82 | +- `None` |
| 83 | + |
| 84 | +````ASP.NET |
| 85 | +<telerik:RadOTPInput ID="RadOTPInput1" runat="server" Rounded="Small" Separator="-"> |
| 86 | + <ItemsCollection> |
| 87 | + <telerik:OTPInputItem GroupLength="3" /> |
| 88 | + <telerik:OTPInputItem GroupLength="3" /> |
| 89 | + </ItemsCollection> |
| 90 | +</telerik:RadOTPInput> |
| 91 | +
|
| 92 | +<telerik:RadOTPInput ID="RadOTPInput2" runat="server" Rounded="Medium" Separator="-"> |
| 93 | + <ItemsCollection> |
| 94 | + <telerik:OTPInputItem GroupLength="3" /> |
| 95 | + <telerik:OTPInputItem GroupLength="3" /> |
| 96 | + </ItemsCollection> |
| 97 | +</telerik:RadOTPInput> |
| 98 | +
|
| 99 | +<telerik:RadOTPInput ID="RadOTPInput3" runat="server" Rounded="Large" Separator="-"> |
| 100 | + <ItemsCollection> |
| 101 | + <telerik:OTPInputItem GroupLength="3" /> |
| 102 | + <telerik:OTPInputItem GroupLength="3" /> |
| 103 | + </ItemsCollection> |
| 104 | +</telerik:RadOTPInput> |
| 105 | +
|
| 106 | +<telerik:RadOTPInput ID="RadOTPInput4" runat="server" Rounded="Full" Separator="-"> |
| 107 | + <ItemsCollection> |
| 108 | + <telerik:OTPInputItem GroupLength="3" /> |
| 109 | + <telerik:OTPInputItem GroupLength="3" /> |
| 110 | + </ItemsCollection> |
| 111 | +</telerik:RadOTPInput> |
| 112 | +
|
| 113 | +<telerik:RadOTPInput ID="RadOTPInput5" runat="server" Rounded="None" Separator="-"> |
| 114 | + <ItemsCollection> |
| 115 | + <telerik:OTPInputItem GroupLength="3" /> |
| 116 | + <telerik:OTPInputItem GroupLength="3" /> |
| 117 | + </ItemsCollection> |
| 118 | +</telerik:RadOTPInput> |
| 119 | +```` |
| 120 | + |
| 121 | +### FillMode |
| 122 | + |
| 123 | +The `FillMode` option controls the way the color is applied to the rendered `input` elements. |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | +The following values are available for the [FillMode]({%slug otpinput/server-side-programming/enums#otpinputfillmode%}) option: |
| 128 | + |
| 129 | +- `Solid` (Default) |
| 130 | +- `Flat` |
| 131 | +- `Outline` |
| 132 | +- `None` |
| 133 | + |
| 134 | +````ASP.NET |
| 135 | +<telerik:RadOTPInput ID="RadOTPInput1" runat="server" FillMode="Solid" Separator="-"> |
| 136 | + <ItemsCollection> |
| 137 | + <telerik:OTPInputItem GroupLength="3" /> |
| 138 | + <telerik:OTPInputItem GroupLength="3" /> |
| 139 | + </ItemsCollection> |
| 140 | +</telerik:RadOTPInput> |
| 141 | +
|
| 142 | +<telerik:RadOTPInput ID="RadOTPInput2" runat="server" FillMode="Flat" Separator="-"> |
| 143 | + <ItemsCollection> |
| 144 | + <telerik:OTPInputItem GroupLength="3" /> |
| 145 | + <telerik:OTPInputItem GroupLength="3" /> |
| 146 | + </ItemsCollection> |
| 147 | +</telerik:RadOTPInput> |
| 148 | +
|
| 149 | +<telerik:RadOTPInput ID="RadOTPInput3" runat="server" FillMode="Outline" Separator="-"> |
| 150 | + <ItemsCollection> |
| 151 | + <telerik:OTPInputItem GroupLength="3" /> |
| 152 | + <telerik:OTPInputItem GroupLength="3" /> |
| 153 | + </ItemsCollection> |
| 154 | +</telerik:RadOTPInput> |
| 155 | +
|
| 156 | +<telerik:RadOTPInput ID="RadOTPInput4" runat="server" FillMode="None" Separator="-"> |
| 157 | + <ItemsCollection> |
| 158 | + <telerik:OTPInputItem GroupLength="3" /> |
| 159 | + <telerik:OTPInputItem GroupLength="3" /> |
| 160 | + </ItemsCollection> |
| 161 | +</telerik:RadOTPInput> |
| 162 | +```` |
| 163 | + |
| 164 | +### Type |
| 165 | + |
| 166 | +The `Type` option controls the type of the `input` elements. |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | +The following values are available for the [Type]({%slug otpinput/server-side-programming/enums#otpinputtype%}) option: |
| 171 | + |
| 172 | +- `Text` (Default) |
| 173 | +- `Number` |
| 174 | +- `Password` |
| 175 | + |
| 176 | +````ASP.NET |
| 177 | +<telerik:RadOTPInput ID="RadOTPInput1" runat="server" Type="Text" Separator="-"> |
| 178 | + <ItemsCollection> |
| 179 | + <telerik:OTPInputItem GroupLength="3" /> |
| 180 | + <telerik:OTPInputItem GroupLength="3" /> |
| 181 | + </ItemsCollection> |
| 182 | +</telerik:RadOTPInput> |
| 183 | +
|
| 184 | +<telerik:RadOTPInput ID="RadOTPInput2" runat="server" Type="Number" Separator="-"> |
| 185 | + <ItemsCollection> |
| 186 | + <telerik:OTPInputItem GroupLength="3" /> |
| 187 | + <telerik:OTPInputItem GroupLength="3" /> |
| 188 | + </ItemsCollection> |
| 189 | +</telerik:RadOTPInput> |
| 190 | +
|
| 191 | +<telerik:RadOTPInput ID="RadOTPInput3" runat="server" Type="Password" Separator="-"> |
| 192 | + <ItemsCollection> |
| 193 | + <telerik:OTPInputItem GroupLength="3" /> |
| 194 | + <telerik:OTPInputItem GroupLength="3" /> |
| 195 | + </ItemsCollection> |
| 196 | +</telerik:RadOTPInput> |
| 197 | +```` |
| 198 | + |
| 199 | +## Next Steps |
| 200 | + |
| 201 | +- [Separator]({%slug otpinput/separator%}) |
| 202 | +- [Adaptiveness]({%slug otpinput/adaptiveness%}) |
| 203 | +- [Accessibility]({% slug otpinput/accessibility/overview%}) |
| 204 | +- [Client-side Programming]({%slug otpinput/client-side-programming/overview%}) |
| 205 | +- [Server-side Programming]({%slug otpinput/server-side-programming/overview%}) |
0 commit comments