Button
| Prop | Type | Default | Description |
|---|---|---|---|
disabled | boolean | false | Disable the button. |
A button primitive with native semantics and disabled state.
<button mlk-button type="button">Save changes</button>
<script type="module">
import { Button } from '@milkui/core/button';
Button.define(document);
</script><button mlk-button></button>Set type="button" explicitly in native markup to prevent form submission. Authored disabled attributes seed the initial disabled prop; use instance.update() for later changes.
| Prop | Type | Default | Description |
|---|---|---|---|
disabled | boolean | false | Disable the button. |
| Attribute | Values |
|---|---|
[disabled] | Present when disabled |
[mlk-button] | Button marker |
Disabled buttons keep native button semantics and do not fire click actions.
<button mlk-button type="button" disabled>Save changes</button>
<script type="module">
import { Button } from '@milkui/core/button';
Button.define(document);
</script>Button renders a native button, so it follows browser button behavior.
| Key | Description |
|---|---|
Space | Activates the button. |
Enter | Activates the button. |
Tab | Moves focus to the next focusable element. |