Component / Layout

Animated Tabs

Navigate linked views with complete tab semantics, roving focus, automatic or manual activation, and a measured indicator that follows selection without obscuring focus.

Activation
Orientation
Workspace views / controlled
Selected / Overview24

Active motion components

Lifecycle
Scoped
Keyboard
Ready
Motion
Enabled

Delivery contract

Install it

pnpm add easecraft@0.1.0

The component imports stable APIs from easecraft.

Files / 00

    Dependencies / 03

    easecraft
    npm / 0.1.0
    react
    peer / >=18.2.0 <20.0.0
    react-dom
    peer / >=18.2.0 <20.0.0

    Package usage

    Use it

    import { AnimatedTabs } from "easecraft";
    
    <AnimatedTabs
      items={views}
      getValue={(view) => view.id}
      getLabel={(view) => view.label}
      aria-label="Workspace views"
    >
      {(view) => <ViewPanel view={view} />}
    </AnimatedTabs>

    Typed contract

    API

    PropTypeDefaultPurpose
    itemsreadonly Item[]requiredTab and panel data
    getValue(item) => stringrequiredStable tab value
    getLabel(item) => ReactNoderequiredTab label renderer
    children(item) => ReactNoderequiredSelected panel renderer
    valuestringuncontrolledControlled selected value
    defaultValuestringfirst enabledInitial uncontrolled value
    onValueChange(value) => voidnoneSelection callback
    activationMode"automatic" | "manual""automatic"Keyboard activation
    orientation"horizontal" | "vertical""horizontal"ARIA and arrow direction
    loopbooleantrueWrap arrow navigation
    isDisabled(item) => booleannoneDisable individual tabs
    durationduration token | number"normal"Indicator and panel duration
    distancedistance token | number"small"Panel travel distance
    easingeasing token | string"move"Indicator easing
    panelEasingeasing token | string"enter"Panel easing
    asHTML tag"div"Polymorphic host element

    Release requirement

    Accessibility

    Semantic linkage
    Each tab controls and labels one stable tab panel through generated IDs.
    Keyboard
    Arrow keys, Home, and End move focus while disabled tabs are skipped.
    Activation
    Automatic mode selects on focus; manual mode waits for Enter or Space.
    Reduced motion
    Selection, content, and indicator position update immediately.