-
Notifications
You must be signed in to change notification settings - Fork 80
Update Button Overview #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| title: Disabled Button | ||
| page_title: Disabled Button | ||
| description: Learn how to configure a disabled Blazor Button component by Telerik UI. | ||
| slug: button-disabled | ||
| tags: telerik,blazor,disabled,button, | ||
| published: True | ||
| position: 5 | ||
| --- | ||
|
|
||
| # Disabled Button | ||
|
|
||
| Sometimes specific buttons in an application must be temporarily disabled. To control the enabled state of the component, use the `Enabled` Boolean attribute. | ||
|
|
||
| The following example demonstrates how to enable and disable the Button. | ||
|
|
||
| >caption Toggle Telerik Button Enabled State | ||
|
|
||
| ````CSHTML | ||
| <p> | ||
| <label> | ||
| <TelerikCheckBox @bind-Value="@ButtonIsEnabled" /> Toggle Button State | ||
| </label> | ||
| </p> | ||
|
|
||
| <TelerikButton Enabled="@ButtonIsEnabled">@ButtonText</TelerikButton> | ||
|
|
||
| @code { | ||
| bool ButtonIsEnabled { get; set; } = false; | ||
| string ButtonText => ButtonIsEnabled ? "Enabled Button" : "Disabled Button"; | ||
| } | ||
|
|
||
| >caption Comparison between disabled and enabled button | ||
|
|
||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| title: Styling | ||
| page_title: Styling | ||
| description: Learn how to apply styles to the Blazor Button component by Telerik UI. | ||
| slug: button-styling | ||
| tags: telerik,blazor,button,styling, | ||
| published: True | ||
| position: 10 | ||
| --- | ||
|
|
||
| # Styling | ||
|
|
||
| There are a few ways to style the Button component: | ||
|
|
||
| * Set a [primary button](#primary-button) style. | ||
| * Use another [built-in theme]({%slug general-information/themes%}). | ||
| * Use the [Button `Class`](#button-class) attribute. | ||
|
|
||
| ## Primary Button | ||
|
|
||
| Through the primary button styling, you can make the button use a strong color to attract attention. To do that, set its `Primary` property to true. | ||
|
|
||
| >caption Button with the Primary color scheme from the current theme | ||
|
|
||
| ````CSHTML | ||
| <TelerikButton Primary="true">Primary</TelerikButton> | ||
| ```` | ||
|
|
||
| ## Button Class | ||
|
|
||
| The Class attribute allows you to define custom CSS rules that apply to the HTML rendering of one or several Buttons. | ||
|
|
||
| >caption Set CSS class to the button and change its appearance | ||
|
|
||
| ````CSHTML | ||
| <TelerikButton Class="my-button">Large button with red text</TelerikButton> | ||
|
|
||
| <style> | ||
| .my-button, | ||
| .my-button:hover { | ||
| color: red; | ||
| width: 200px; | ||
| height: 50px; | ||
| } | ||
| </style> | ||
| ```` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.