Skip to content

vscode-elements/react-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 

Repository files navigation

React Elements

React wrapper components for VSCode Elements.

Install

npm i @vscode-elements/react-elements

A minimal working example

import {
  VscodeBadge,
  VscodeTabHeader,
  VscodeTabPanel,
  VscodeTabs,
} from "@vscode-elements/react-elements";

function App() {
  return (
    <>
      <VscodeTabs
          onVscTabsSelect={(e) => {
            console.log(e);
          }}
        >
        <VscodeTabHeader>
          Lorem
          <VscodeBadge variant="counter" slot="content-after">10</VscodeBadge>
        </VscodeTabHeader>
        <VscodeTabPanel>panel content 1</VscodeTabPanel>
        <VscodeTabHeader>Ipsum</VscodeTabHeader>
        <VscodeTabPanel>panel content 2</VscodeTabPanel>
      </VscodeTabs>
    </>
  );
}

export default App;