@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    接口 HStackOptions

    hstack 节点的可选项。

    interface HStackOptions {
        accessibilityLabel?: string;
        action?: {
            commandId: string;
            input?: JSONType;
            inputFrom?: Record<string, string>;
        };
        align?: "start"
        | "end"
        | "center"
        | "stretch";
        bleed?: "card-top";
        distribute?: "start" | "end" | "center" | "between";
        elevation?: "flat" | "raised";
        gap?:
            | "none"
            | "sm"
            | "md"
            | "micro"
            | "xs"
            | "compact"
            | "related"
            | "emphasis"
            | "section"
            | "lg";
        grow?: boolean;
        height?: "data-tile";
        id?: string;
        interaction?: "text"
        | "media"
        | "content"
        | "soft";
        padding?:
            | "none"
            | "card"
            | "sm"
            | "md"
            | "lg"
            | "block-xs"
            | "block-sm"
            | "balanced";
        radius?: "none"
        | "sm"
        | "md"
        | "lg"
        | "full";
        size?: "md" | "hero";
        surface?: "none" | "card" | "panel" | "inset" | "outline" | "tint";
        width?: "fill" | "auto";
        wrap?: boolean;
    }

    层级 (查看层级一览)

    索引

    属性

    accessibilityLabel?: string

    图标等无可见文字的点击容器使用的可访问名称。

    action?: {
        commandId: string;
        input?: JSONType;
        inputFrom?: Record<string, string>;
    }

    整个容器可点击时回送的 Command。

    align?: "start" | "end" | "center" | "stretch"

    交叉轴对齐。

    bleed?: "card-top"

    让表面延伸到宿主持有的受控边界,内容仍保留安全区。

    distribute?: "start" | "end" | "center" | "between"

    主轴分布。

    elevation?: "flat" | "raised"

    层次档位。

    gap?:
        | "none"
        | "sm"
        | "md"
        | "micro"
        | "xs"
        | "compact"
        | "related"
        | "emphasis"
        | "section"
        | "lg"

    子节点间距档位。

    grow?: boolean

    是否吃掉父容器主轴的剩余空间。

    height?: "data-tile"

    纵向固定尺寸档位。

    id?: string

    宿主自持呈现状态时使用的稳定键。

    interaction?: "text" | "media" | "content" | "soft"

    可选交互外观;soft 用带留白的淡底,media 仅增强图片和标题,text 仅改变文字反馈,content 仅增强内部强调文案和缩略图,默认不改变布局。

    padding?:
        | "none"
        | "card"
        | "sm"
        | "md"
        | "lg"
        | "block-xs"
        | "block-sm"
        | "balanced"

    容器内边距档位;声明了表面时缺省为 md。

    radius?: "none" | "sm" | "md" | "lg" | "full"

    圆角档位;声明了表面时缺省为 md。

    size?: "md" | "hero"

    固定正方形尺寸;用于标准媒体/图标槽,不接受自由宽高。

    surface?: "none" | "card" | "panel" | "inset" | "outline" | "tint"

    表面配方。

    width?: "fill" | "auto"

    横向尺寸档位;auto 使用内容固有宽度,fill 贯通父容器。

    wrap?: boolean

    是否允许换行。