AncrelDocumentationv0.3.0

Search documentation

    Playground / fe.activity-rail

    ActivityRail playground

    Vertical page navigation with roving focus, optional badges and router links.

    Preview

    Example controls

    State matrix

    Hover a specimen, Tab to focus, or hold the pointer down to inspect its native state.

    dark / comfortable
    VariantDefaultHoverFocus-visibleActive
    Sample

    Published example

    API reference
    import { useState } from 'react'
    import '@ancrel/tokens/css'
    import '@ancrel/workspace/styles.css'
    import { ActivityRail } from '@ancrel/workspace'
    
    export default function App() {
      const [page, setPage] = useState('overview')
      return <ActivityRail aria-label="Project pages" selectedId={page} onSelect={setPage}
        items={[
          { id: 'overview', label: 'Overview', icon: '▦' },
          { id: 'updates', label: 'Updates', icon: '◷', badge: 121 },
          { id: 'saved', label: 'Saved', icon: '☆', badge: 'dot' },
        ]} />
    }