> For the complete documentation index, see [llms.txt](https://icij.gitbook.io/datashare/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icij.gitbook.io/datashare/developers/frontend/design-system.md).

# Design System

Datashare's frontend is build with Vue 3 and Bootstrap 5. We document all component of the interface on a dedicated Storybook:

{% embed url="<https://icij.github.io/datashare-client/>" %}

To facile the creation of plugin, each component can be imported directly from the core:

```javascript
// It's usualy safer to wait for the app to be ready
document.addEventListener('datashare:ready', async () => {
    // This load the ButtonIcon component asynchronously
    const ButtonIcon = await datashare.findComponent('Button/ButtonIcon')
    // Than we create a dummy component. For the sake of simplicity we use
    // Vue 3's option API but we strongly encourage you to build your plugins
    // with Vite and use the option API.
    const definition = {
        components: {
            ButtonIcon,
        },
        methods: {
            sayHi() {
                alert('Hi!')
            }
        },
        template: `
            <button-icon @click="sayHi()" icon-left="hand-waving">
                Say hi
            </button-icon>
        `
    }
    
    // Finally, we register the component's definition in a hook.
    datashare.registerHook({ target: 'app-sidebar-sections:before', definition })
})
```

In the example you learn that:

* Datashare launch must be awaited with "datashare:ready"
* You can asynchronously import components with `datashare.findComponent`
* Component can be registered on targeted locations with a "hook"
* All icons from [Phosphor](https://phosphoricons.com/) are available and loaded automatically


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://icij.gitbook.io/datashare/developers/frontend/design-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
