---
title: tab的基本用法
title_en: normal usage for tab component
category: 2
---
展示了一个tab组件的基本用法
```jsx
import { CrumbTab, Button} from 'parkball'

  const category = [
    {
      title: 'Category 1',
      content: (fn)=>{
        return <div><Button onClick={(et)=>{
          fn(et)
        }}>Show Details</Button></div>
      },
      key: '1',
      closable: false,
    },
  ]

  const crumbs = ['class1', 'class2']

ReactDOM.render(
  <CrumbTab
    category={category}
    crumbs={crumbs}
  />,
  mountNode
)
```