For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.2.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.2.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.2.0/components/input-group.md.
  • 简体中文
  • v0.2.0
  • 输入组

    Live previewHTML · CSS · JavaScript
    12 results

    用途

    Include CSS

    导入 Tailwind 和一个完整的 A3S UI 样式包。

    @import "tailwindcss";
    @import "@a3s-lab/ui/a3s.css";

    或者只导入基本CSS、输入CSS组和一个样式包。

    @import "tailwindcss";
    @import "@a3s-lab/ui/base.css";
    @import "@a3s-lab/ui/components/input-group.css";
    @import "@a3s-lab/ui/styles/a3s.css";

    使用CDN或批量程序导入?请参见安装页

    Add your input group HTML

    <div class="input-group">
      <input type="text" aria-label="搜索" placeholder="Search..." />
      <span data-align="start" aria-hidden="true"> <!-- icon --></span>
      <span data-align="end">12 results</span>
    </div>

    class="input-group" 添加到根目录。原生控件保持语义并成为该外壳内的无边界子控件。

    <div class="input-group">

    The root shell. Add role="group" and an accessible label only when the group itself needs to be named.

    <input>, <textarea>, <select>
    The native control. Use aria-invalid="true" for invalid state and disabled for disabled state.
    <span>, <svg>, <kbd>
    Decorative or helper content. Use aria-hidden="true" for decorative icons.
    <button>, <div role="group">
    Interactive actions. Use role="group" with an accessible label when multiple related actions share one side of the input.
    <header>, <footer>
    Header or footer addon rows for vertically oriented input groups.
    data-align="start|end"
    Optional visual placement. Values use logical direction, so start/end automatically flip in RTL. Use data-orientation="vertical" on the root for header/footer layouts.
    [data-control]
    Escape hatch for custom controls that are not native input, textarea, or select.

    示例

    在插件包装器上使用 data-align="start|end" 将它们定位为内联。使用 data-orientation="vertical"headerfooter 进行块放置。

    内联启动

    Live previewHTML · CSS · JavaScript

    Icon positioned at the start.

    直插端

    Live previewHTML · CSS · JavaScript

    Icon positioned at the end.

    块启动

    Live previewHTML · CSS · JavaScript
    Full Name

    Header positioned above the input.

    script.js

    Header positioned above the textarea.

    区块结束

    Live previewHTML · CSS · JavaScript
    USD

    Footer positioned below the input.

    0/280

    Footer positioned below the textarea.

    图标

    Live previewHTML · CSS · JavaScript

    文本

    Live previewHTML · CSS · JavaScript
    $USD
    https://.com
    @company.com
    120 characters left

    按钮

    Live previewHTML · CSS · JavaScript
    https://

    Kbd

    Live previewHTML · CSS · JavaScript
    ⌘K

    下拉菜单

    Live previewHTML · CSS · JavaScript

    旋转器

    Live previewHTML · CSS · JavaScript

    Saving...

    Please wait...

    文本区域

    Live previewHTML · CSS · JavaScript
    Line 1, Column 1
    script.js

    自定义输入

    Live previewHTML · CSS · JavaScript

    RTL

    Live previewHTML · CSS · JavaScript
    ١٢ نتيجة

    جاري الحفظ...

    ٠/٢٨٠

    تذييل موضع أسفل منطقة النص.