用于吸引用户注意力的简短信息。
¥API Reference
¥Root
图标和文本部分分组。此组件基于 div
元素并支持 常用边距属性。
¥Groups Icon and Text parts. This component is based on the div
element and supports common margin props.
¥Icon
为与标注关联的图标提供宽度和高度。此组件基于 div
元素。
¥Provides width and height for the icon associated with the callout. This component is based on the div
element.
¥Text
渲染标注文本。此组件基于 p
元素。
¥Renders the callout text. This component is based on the p
element.
¥Examples
¥Size
使用 size
属性控制大小。
¥Use the size
prop to control the size.
¥Variant
使用 variant
属性控制视觉样式。
¥Use the variant
prop to control the visual style.
¥Color
使用 color
属性指定特定的 color。
¥Use the color
prop to assign a specific color.
¥High-contrast
使用 HighContrast
属性来增加额外的对比度。
¥Use the HighContrast
prop to add additional contrast.
¥As alert
在需要用户立即注意时(例如出现错误消息时),在标注中添加原生 WAI-ARIA alert
角色。屏幕阅读器将被中断,并立即播报新内容。
¥Add a native WAI-ARIA alert
role to the callout when the user’s immediate attention is required, like when an error message appears. The screen reader will be interrupted, announcing the new content immediately.