# Extract \`Tab\` component \(\#3539\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/393be3cedfe6775e5607a6cd879ae1ac421044c5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 393be3cedfe6775e5607a6cd879ae1ac421044c5

Requested commit: 393be3cedfe6775e5607a6cd879ae1ac421044c5

Commit: 393be3cedfe6775e5607a6cd879ae1ac421044c5

Tree: 8fc8ca78544cfd9a64594ea30a0311c6017c5c72

Author: Marshall Bowers

Committer: GitHub

## Message

```
Extract `Tab` component (#3539)

This PR extracts a new `Tab` component from the tabs implementation in
the workspace.

This will allow us to reuse this component anywhere that we need to use
tabs.

Like our other newer components, the `Tab` component has a relatively
open API.

It accepts `children` (or `child`) as well as a `start_slot` and
`end_slot` to position content in the slots on either end of the
content. These slots also respect the `TabCloseSide` and will switch
positions based on this value.

<img width="763" alt="Screenshot 2023-12-07 at 12 19 42 PM"
src="https://github.com/zed-industries/zed/assets/1486634/78e4db6a-f807-431e-8777-f52f2631e6ed">

Release Notes:

- N/A
```

## Parents

- [c91207b4500829a8500872455bfd9f268cbc5c9c](https://git.cafe/gitcafe/zed/commit/c91207b4500829a8500872455bfd9f268cbc5c9c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/393be3cedfe6775e5607a6cd879ae1ac421044c5?format=markdown)
