div
div is a container that groups related components together.
XML Element |
|
|---|---|
Java Class |
|
Basics
The example uses div as a block container for headings, paragraphs, lists, and a link:
<div>
<h1 text="HTML Tags Sample"/>
<p text="This is a sample text that showcases the usage of different HTML tags."/>
<unorderedList>
<listItem>
<span classNames="text-semibold" text="Bold text: "/>
<span text="Use the <b> tag to make text "/>
<span classNames="text-semibold" text="bold."/>
</listItem>
</unorderedList>
<p text="Hyperlinks can be added using the <a> tag:"/>
<anchor href="https://www.jmix.io" text="Visit jmix.io" target="BLANK"/>
</div>
| Use the html component to include raw HTML. |
Theme Variants
Use the themeNames attribute to style the component as a badge. Combine badge with color, emphasis, shape, or size variants.
| Variant | Description | Supported By |
|---|---|---|
|
Applies badge styling. |
Aura, Lumo |
|
Applies a semantic color. |
Aura, Lumo |
|
Adds stronger visual emphasis. |
Aura, Lumo |
|
Rounds the badge corners. |
Aura, Lumo |
|
Makes the badge smaller. |
Aura, Lumo |
|
Uses the regular badge size. |
Aura, Lumo |
Attributes
Common attributes serve the same purpose for all components.
The following attributes are specific to div:
| Name | Description | Default |
|---|---|---|
Applies one or more variants listed in Theme Variants. |
— |
Handlers
Common handlers are configured in the same way for all components.
The following handlers are specific to div:
| Name | Description |
|---|---|
Fires when the component is clicked. Use the |
Elements
A div can display text or contain nested components and layouts. If child elements are present, the text attribute is ignored.