For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/components/image-select.md.

图像选择

把少量视觉候选项表达为原生单选或复选任务,并在缩略图之外保留名称和选择状态。

实时预览

用法

<fieldset class="image-select" aria-label="Cover treatment">
  <div data-image-option><input id="cover-light" type="radio" name="cover" checked /><label htmlFor="cover-light"><span data-image-preview style="background:#f7f7f8"></span>Light surface</label></div><div data-image-option><input id="cover-dark" type="radio" name="cover" /><label htmlFor="cover-dark"><span data-image-preview style="background:#202024"></span>Dark surface</label></div>
</fieldset>

契约

接口值
根选择器.image-select
原生根元素<fieldset>
状态ready, disabled, invalid
事件change, input
方法—

产品边界

它不适合大型媒体库、上传管理或精细裁剪。候选超过一屏时应使用带搜索、分页和加载状态的宿主集合。

组件只发布可复用的交互边界。数据获取、持久化、权限、可信内容与业务实体继续由宿主产品拥有。

可访问性

每项由原生输入承载状态并具备文字名称。缩略图只是辅助信息,键盘焦点和选中轮廓清晰可见。