@antadesign/anta
    Preparing search index...

    Function TabsUnreviewed

    • <Tabs> — a tablist with optional panels. The strip renders from the options array; panels are <TabPanel> children that manage their own visibility.

      The strip (<a-tabs>) and the panels render as flat siblings — there is no wrapper element, so className / id / style / ...rest land on the strip. Laying the strip out relative to its panels is the consumer's job: a horizontal strip stacks above the panels in normal flow; for a vertical strip beside them, wrap <Tabs> in your own flex container. Any non-TabPanel children render verbatim as siblings too.

      <a-tabs> owns selection off-DOM (it sets each tab's selected property and the roving aria-activedescendant via ElementInternals, writing no attribute to any tab); this wrapper mirrors the value only to render the strip's roving tabindex, and the panels read it straight from <a-tabs>. Controlled (value + onStateChange) or uncontrolled (defaultValue).

      Requires @antadesign/anta/elements (client-side only).

      Parameters

      Returns any

      <Tabs
      defaultValue="account"
      label="Settings"
      options={[
      { value: "account", label: "Account", icon: "user" },
      { value: "security", label: "Security" },
      ]}
      >
      <TabPanel value="account"><AccountForm /></TabPanel>
      <TabPanel value="security"><SecurityForm /></TabPanel>
      </Tabs>