logo Enterprise-level component library based on Bootstrap and Blazor
gitee
oscs
version
license
download
repo
commit
build
coverage

Component label

This set of components includes ValidateForm EditorForm and a variety of Form components inherited from ValidateBase<TValue>. Among these components There is a special set of display front label logic, now let’s sort it out in a unified way:

  • The ValidateForm component is a verifiable form component. The form component in this component will automatically perform data compliance checks. If Data non-compliance will prevent the Submit action, which is the most frequently used component in data submission
  • The EditorForm component is an ordinary form component. After this component is bound to the Model, the entire form can be automatically generated, which greatly reduces repetition Code, put the ValidateForm on the outside to open the data compliance check very convenient, concise and efficient

Take the BootstrapInput input box component as an example to explain whether to display the Label logic

Suitable for data entry

Demo

When two-way binding is not used

  • Label will not be displayed by default
  • Control whether to display through the ShowLabel property
  • Display content when setting DisplayText
  • When not set, render a contentless label component as a placeholder
No settings in the first text box, no label
The second text box setting ShowLabel='true' DisplayText=`` displays a placeholder label without content
The third text box setting ShowLabel='true' DisplayText='Name' shows the set content label
The fourth text box setting ShowLabel='true' DisplayText='@null' displays a placeholder label without content

When using two-way binding

The first text box is set to @bind-Value='Dummy.Name', no label is displayed
The second text box setting @bind-Value='Dummy.Name' ShowLabel='true' DisplayText='@Localizer[nameof(Foo.Address)]' Display the contents of the setting
The third text box setting @bind-Value='Dummy.Name' ShowLabel='true' DisplayText=`` Show no content placeholder label
The fourth text box setting @bind-Value='Dummy.Name' ShowLabel='true' DisplayText='@null' Display the label content under the resource file mechanismLabel code>

Not used in ValidateForm

Demo

Show label

The ShowLabel property of the EditorForm component is not set. If it is not set, it is equivalent to set to true. All components display tags

Loading...

Do not display labels

Set ShowLabel="false", all form components in the component Do not display tags

Loading...

Alignment

LabelAlign="Alignment.Right" set the label alignment is right

Loading...

Alignment

LabelAlign="Alignment.Center" set the label alignment is center

Loading...

Used in external ValidateForm

Demo

Show label

The ShowLabel property of the EditorForm component is not set. If it is not set, it is equivalent to set to true. All components display tags

Loading...

Do not display labels

Set ShowLabel="false", all form components in the component Do not display tags

Loading...

Show labels are automatically turned on by default

Demo

Show label

The ShowLabel property of the EditorForm component is not set. If it is not set, it is equivalent to set to true. All components display tags

Do not display labels

Set ShowLabel="false", all form components in the component Do not display tags

Show labels

set class form-inline for the all labels within the component are prefixed

Right

form-inline-end set the label alignment is right

Center

form-inline-center set the label alignment is center

Tooltip

The default width of component front label is 120px. If you need more, please change the style variable --bb-row-label-width in the project style file or remove RowType.Inline
In this example, set the ShowLabelTooltip in the form-inline style to true to make the mouse hover over the cropped label to display the complete information


B station related video link

No

交流群

QQ Group:BootstrapAdmin & Blazor 795206915 675147445 Welcome to join the group discussion
img
Themes
Bootstrap
Motronic
Ant Design (完善中)
DevUI (制作中)
LayUI (完善中)
An error has occurred. This application may no longer respond until reloaded. Reload
Seems like the connection with the server has been lost. It can be due to poor or broken network. Please hang on while we're trying to reconnect...
Oh snap! Failed to reconnect with the server. This is typically caused by a longer network outage, or if the server has been taken down. You can try to reconnect, but if that does not work, you need to reload the page.
Oh man! The server rejected the attempt to reconnect. The only option now is to reload the page, but be prepared that it won't work, since this is typically caused by a failure on the server.
Bootstrap Blazor Component library updated to 7.4.4-beta01

Bootstrap Blazor at present has more than 120 components. This component is based on Bootstrap Blazor An enterprise-level component library that provides several types of common components such as layout, navigation, form, data, notification, icon, voice, etc. Each component has been carefully designed with modularity, responsiveness and excellent performance. Starting from more practical scenarios, meeting the needs of various scenarios, greatly reducing the time cost of developers, greatly shortening the development cycle, greatly improving development efficiency, and providing a set of General Rights Management System Example project。Bootstrap Blazor Products are maintained by a professional full-time technical team, with efficient response speed, diversified solutions, long-term support, and enterprise-level support. At present, it has been used in many well-known state-owned enterprises, and the project is running stably with a maximum of 1200 people online. On the right is the QR code of the Chinese Blazor QQ community with the largest number of people in China, welcome to scan and join the group.

component updated to 6.6.0 Change log [portal] If the component brings you convenience, please help to light up the project Star github gitee

QQGroup
QQ 795206915