For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.1.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.1.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.1.0/components/accordion.md.
  • 简体中文
  • v0.1.0
  • 折叠面板

    一组垂直堆叠的交互式标题,每个标题显示一部分内容。

    Live previewHTML · CSS · JavaScript

    What are your shipping options?

    We offer standard (5-7 days), express (2-3 days), and overnight shipping. Free shipping on international orders.

    What is your return policy?

    You can return items within 30 days of delivery. Items must be unused and in their original packaging.

    How can I contact customer support?

    Email support@example.com or use live chat during business hours.

    用途

    Include CSS

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

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

    或者仅导入基本 CSS、Accordion 组件 CSS 和一个样式包。

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

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

    Include JavaScript

    复制或提供完整的 A3S UI JavaScript 包。

    <script src="/assets/js/all.min.js" defer></script>

    或者复制或提供 A3S UI 运行时和 Accordion 脚本。

    <script src="/assets/js/runtime.min.js" defer></script>
    <script src="/assets/js/accordion.min.js" defer></script>

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

    Add your accordion HTML

    <section class="accordion">
      <details open>
        <summary>
          Is it accessible?
          <svg class="lucide lucide-chevron-down" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6" /></svg>
        </summary>
        <section>Yes. It uses native disclosure semantics.</section>
      </details>
    </section>

    A3S UI uses native <details> and <summary> elements for disclosure semantics. The accordion JavaScript only enforces single-item behavior by default and prevents disabled items from toggling. Add data-multiple to the root when more than one item can be open at a time.

    HTML 结构

    <section class="accordion">

    Root accordion container. Add data-multiple to allow multiple open items.

    <details open>

    Accordion item. Use the native open attribute for the default expanded item. Add aria-disabled="true" when an item should not toggle.

    <summary>
    Accordion trigger. Keep the trigger text visible and add an optional trailing icon.
    <section>
    Accordion content. Use any semantic element that fits your content.

    JavaScript API

    Accordion不公开自定义方法或事件。使用原生details.open布尔值以编程方式打开或关闭项目。

    document.querySelector("#billing").open = true

    示例

    基本

    一次显示一个项目的基本折叠面板。第一项默认打开。

    Live previewHTML · CSS · JavaScript

    How do I reset my password?

    Click on 'Forgot Password' on the login page, enter your email address, and we'll send you a link to reset your password. The link will expire in 24 hours.

    Can I change my subscription plan?

    Yes. You can upgrade or downgrade your plan from the billing settings page.

    What payment methods do you accept?

    We accept all major credit cards, PayPal, and bank transfers for annual plans.

    多个

    使用data-multiple允许同时打开多个项目。

    Live previewHTML · CSS · JavaScript

    Notification Settings

    Manage how you receive notifications. You can enable email alerts for updates or push notifications for mobile devices.

    Privacy & Security

    Control account security, session history, and privacy preferences.

    Billing & Subscription

    Review invoices, change plans, and update payment methods.

    已禁用

    在某个项目上使用 aria-disabled="true" 将其禁用。

    Live previewHTML · CSS · JavaScript

    Can I access my account history?

    Yes. Your account history is available from the activity page.

    Premium feature information

    This item is disabled.

    How do I update my email address?

    Go to account settings, update your email, then confirm the change from your inbox.

    边框

    使用带边框的根时,向行添加水平填充。

    Live previewHTML · CSS · JavaScript

    How does billing work?

    We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members.

    Is my data secure?

    Data is encrypted in transit and at rest.

    What integrations do you support?

    We support Slack, GitHub, Google Workspace, and webhooks.

    将折叠面板包裹在卡片中以进行分组支持或计费内容。

    Live previewHTML · CSS · JavaScript

    Subscription & Billing

    Common questions about your account, plans, payments and cancellations.

    What subscription plans do you offer?

    We offer three subscription tiers: Starter ($9/month), Professional ($29/month), and Enterprise ($99/month). Each plan includes increasing storage limits, API access, priority support, and team collaboration features.

    How does billing work?

    Billing is charged at the beginning of each cycle.

    How do I cancel my subscription?

    Cancel from billing settings. Your plan remains active until the end of the current cycle.

    RTL

    折叠面板间距使用逻辑属性。在折叠面板或父元素上设置 dir="rtl"

    Live previewHTML · CSS · JavaScript

    كيف يمكنني إعادة تعيين كلمة المرور؟

    انقر على 'نسيت كلمة المرور' في صفحة تسجيل الدخول، أدخل عنوان بريدك الإلكتروني، وسنرسل لك رابطا لإعادة تعيين كلمة المرور. سينتهي صلاحية الرابط خلال 24 ساعة.

    هل يمكنني تغيير خطة الاشتراك الخاصة بي؟

    نعم، يمكنك تغيير الخطة من إعدادات الفوترة.

    ما هي طرق الدفع التي تقبلونها؟

    نقبل بطاقات الائتمان الرئيسية والتحويلات البنكية.