You can set the
defaultFieldLabelPosition
constructor option to override the default style These components should be used as a direct child of Field:
.control
elements (html class)
This email is invalid
This username is available
Password is too short
Password must have at least 8 characters
# Label Position
Add the label-position
prop to modify field style.
# Object syntax
You can also use object syntax for type
and message
props just like Vuejs class
.
Username is not available
Password is too short
Password must have at least 8 characters
# Addons
The above cited components are automatically attached together when inside a Field.
Use the expanded
prop on the control to fill up the remaining space.
What do you want to search?
What a beautiful email!!
# Groups
You can group those components together with the grouped
property.
Use the expanded
prop on the control to fill up the remaining space.
What do you want to search?
What do you want to search?
# Nested groups
Nested Fields can be grouped as well, you have to use the expanded
prop on the Field to fill up the remaining space.
# Responsive groups
Add the group-multiline
prop to allow controls to fill up multiple lines. This is ideal for a long list of controls.
# Positions
Add the position
prop to modify its alignment.
# Combining addons and groups
# Horizontal
Add the horizontal
prop for aligning label and control in horizontal forms.
Please enter a subject
# Label classes
Add the custom-class
prop to adjust the styling of the label.
This email is invalid
# Label slot
Use the label
slot for complex labels with HTML content or components. Note it overrides the label
prop.
Name | Description | Type | Values | Default |
---|---|---|---|---|
type | Type (color) of the field and help message, also adds a matching icon, optional. Used by Input, Select and Autocomplete | String, Object | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | — |
label | Field label | String | — | — |
label-for | Same as native for set on the label | String | — | — |
custom-class | CSS classes to be applied on field label | String | — | — |
message | Help message text | String, Object, Array | — | — |
grouped | Direct child components/elements of Field will be grouped horizontally (see which ones at the top of the page). Do not mix with horizontal because there is an issue that the validation error cannot be reset once it is set if combined with horizontal . | Boolean | — | false |
group-multiline | Allow controls to fill up multiple lines, making it responsive | Boolean | — | false |
position | Which position should the addons appear, optional | String | is-centered , is-right | — |
addons | Field automatically attach controls together | Boolean | — | true |
horizontal | Group label and control on the same line for horizontal forms. Do not mix with grouped because there is an issue that the validation error cannot be reset once it is set if combined with grouped . | Boolean | — | false |
label-position | Position of label | String | inside , on-border | - |
You can use these variables to customize this component.
Name | Default |
---|---|
$floating-in-height | 3.25em |
Bulma variables | Link |
This page is open source. Noticed a typo or something's unclear?