AncrelDocumentationv0.3.0

Search documentation

    Playground / fe.tabs

    Tabs playground

    Switch local panels with a manually activated, roving tab list.

    Preview

    24 checks passed.

    Props editor

    State matrix

    dark / comfortable
    VariantDefault
    Sample
    24 checks passed.

    Published example

    API reference
    'use client'
    
    import { Tabs, TabList, Tab, TabPanel } from '@ancrel/ui'
    import '@ancrel/tokens/css'
    import '@ancrel/ui/styles.css'
    
    export default function App() {
      return <Tabs defaultValue="preview">
        <TabList aria-label="Document view">
          <Tab value="preview">Preview</Tab>
          <Tab value="history" disabled>History</Tab>
          <Tab value="source">Source</Tab>
        </TabList>
        <TabPanel value="preview">A walk along the shore</TabPanel>
        <TabPanel value="history">No revisions yet.</TabPanel>
        <TabPanel value="source"><code># A walk along the shore</code></TabPanel>
      </Tabs>
    }