Button
Properties for components that support client-side checks.
组件展示
属性
属性名
类型
必需性
描述
id*ComponentId必需
暂无描述
accessibilityAccessibilityAttributes可选
暂无描述
stylesStyles可选
Component style properties
weightnumber可选
The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column.
checksCheckRule[]可选
A list of checks to perform. These are function calls that must return a boolean indicating validity.
component*"Button"必需
暂无描述
child*string必需
The unique identifier for a component, used for both definitions and references within the same surface.
variant"primary" | "borderless"可选
A hint for the button style. If omitted, a default button style is used. 'primary' indicates this is the main call-to-action button. 'borderless' means the button has no visual border or background, making its child content appear like a clickable link.
可选值:
primary, borderlessaction*object | object必需
Defines an interaction handler that can either trigger a server-side event or execute a local client-side function.
代码示例
{
"component": "Button",
"id": "button_1",
"child": "示例child",
"action": {}
}