Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
vue3-org-chart
Advanced tools
Vue3 Org Chart is a tree diagram that visualizes the structure of an organization and the relationships and relatives. It is a Vue 3 component.
Vue3 Org Chart is a simple and lightweight organization chart component for Vue3. It is highly customizable.
Playground : https://playcode.io/vue3orgchart
Demo : https://vue3orgchart.playcode.io
npm i vue3-org-chart
JS entry point
import { createApp } from 'vue'
import App from './App.vue'
import { Vue3OrgChartPlugin } from 'vue3-org-chart'
import 'vue3-org-chart/dist/style.css'
const app = createApp(App)
app.use(Vue3OrgChartPlugin)
app.mount('#app')
// alternatively, you can import the component directly
// to use component, Vue3OrgChart instead of Vue3OrgChartPlugin
<script setup>
import { Vue3OrgChart } from 'vue3-org-chart'
import 'vue3-org-chart/dist/style.css'
// ...
</script>
for more detailed example, please check the examples folder
<div>
<vue3-org-chart json="YOUR_DATA_JSON_URL">
<template #node="{item, children, open, toggleChildren}">
<!-- Node Element / TEMPLATE START -->
<div>{{item.name}}</div>
<button v-if="children.length" @click="toggleChildren"> {{ open ? '-' : '+' }}</button>
<!-- Node Element / TEMPLATE END -->
</template>
</vue3-org-chart>
</div>
You have full control over node elements, In addition to that there are some css variables for lines and container height or node spacing..
:root {
--vue3-org-chart-container-height: 70vh;
--vue3-org-chart-line-top: .5rem;
--vue3-org-chart-line-bottom: .5rem;
--vue3-org-chart-node-space-x: .5rem;
--vue3-org-chart-line-color: blue;
}
If you want to contribute to the project, please feel free to fork the repository and submit your changes as a pull request. Ensure that the changes you submit are applicable for general use rather than specific to your project.
Copyright (c) 2024 Yusuf ÖZDEMİR, released under the MIT license
FAQs
Vue3 Org Chart is a tree diagram that visualizes the structure of an organization and the relationships and relatives. It is a Vue 3 component.
The npm package vue3-org-chart receives a total of 76 weekly downloads. As such, vue3-org-chart popularity was classified as not popular.
We found that vue3-org-chart demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.