Indicate important notes and highlight parts of your content.
To create a label, just add the .uk-label class to a <span> element.
<span class="uk-label"></span>
<span class="uk-label">Default</span>
<span class="uk-label uk-label-primary">Primary</span>
<span class="uk-label uk-label-secondary">Secondary</span>
<span class="uk-label uk-label-danger">Danger</span> Add one of the following classes for additional styles.
| Class | Description |
|---|---|
.uk-label-primary | Adds a primary style. |
.uk-label-secondary | Adds a secondary style. |
.uk-label-danger | Adds a destructive style. |
<span class="uk-label-success uk-label"></span>
<span class="uk-label">Default</span>
<span class="uk-label uk-label-primary">Primary</span>
<span class="uk-label uk-label-secondary">Secondary</span>
<span class="uk-label uk-label-danger">Danger</span> On your tailwind.config.js file, add the
Label component within the ui() plugin.
import ui from "franken-ui";
ui({
components: {
label: {
hooks: {}
}
}
}),
Note If you are developing theme from scratch, you can use all these hooks. If you’re using the shadcn/ui theme, some hooks might not work as they were already in use or removed. Learn more about using hooks.
| Hook Name | Affected Classes |
|---|---|
hook-label | .uk-label |
hook-success | .uk-label-success |
hook-item-warning | .uk-label-warning |
hook-item-danger | .uk-label-danger |
hook-misc | * |