/tw-tr

React Tree View Component built on top of TailwindCSS/TypeScript/Context API

Primary LanguageTypeScriptMIT LicenseMIT

TailwindCSS Tree View

React Tree View Component built on top TailwindCSS/TypeScript.

Example

{
  "title": "root",
  "children": [
    {
      "title": "Child1",
      "children": [
        {
          "title": "Child2",
          "children": [
            {
              "title": "Child2-1",

            },
            {
              "title": "Child2-2",
              "children": []
            }
          ]
        }
    }
  ]
}
export const Default = () => {
  return (
    <ContextMenuProvider>
      <ContextMenu />
      <Tree root={data} />
    </ContextMenuProvider>
  );
};

Running the project

yarn
yarn build:tailwind
yarn storybook

Dependencies

  • tailwindcss
  • @headlessui/react
  • typescript