Button
Triggers actions in interactive SlexKit layouts.
Usage Notes
- Use for form submission, confirmation actions, and command triggers.
- When
hrefis present, the button renders as a button-styled link action; uselinkfor ordinary inline navigation. selected,active, andpresseddescribe the visual state of the button icon and pressed metadata.- Related components:
linkfor navigation instead of actions,submitfor ToolHost submission flows. - Multiple buttons are typically placed inside a
row. - Use
variantonly for semantic action types, not as a general style picker.
Variants
namespace: "doc_button_variant_diff",
layout: {
"row:variants": {
"button:primary": {
label: "Primary",
variant: "primary"
},
"button:secondary": {
label: "Secondary",
variant: "secondary"
},
"button:danger": {
label: "Danger",
variant: "danger"
},
"button:ghost": {
label: "Ghost",
variant: "ghost"
}
}
}
}
Disabled state
namespace: "doc_button_disabled_diff",
layout: {
"row:disabled": {
"button:enabled": {
label: "Enabled"
},
"button:disabled": {
label: "Disabled",
disabled: true
}
}
}
}