|
|
|
# Initialization
|
|
|
|
|
|
|
|
If you have already an application and you want to add a Sib Compoponent, it's very easy.
|
|
|
|
|
|
|
|
## 1. Import the core of Startin'blox
|
|
|
|
|
|
|
|
To start, simply import the core in your head tag:
|
|
|
|
|
|
|
|
```html
|
|
|
|
<script type="module" src="https://unpkg.com/@startinblox/core"></script>
|
|
|
|
```
|
|
|
|
|
|
|
|
It enables you to use Startin'blox technology and all the main components from the core of the framework.
|
|
|
|
|
|
|
|
## 2. Import the component you want
|
|
|
|
In the documentation of the component you've chosen, you'll find the script to import.
|
|
|
|
|
|
|
|
```html
|
|
|
|
<script type="module" src="https://unpkg.com/@startinblox/my-component"></script>
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3. Use your component
|
|
|
|
|
|
|
|
A component is a simple tag. Each component has its own attributes that allow us to customize its behavior.
|
|
|
|
|
|
|
|
Let's see an exemple with sib-display :
|
|
|
|
|
|
|
|
```html
|
|
|
|
<sib-display
|
|
|
|
data-src="http://api.myadress.com/users/"
|
|
|
|
fields="first_name, last_name"
|
|
|
|
></sib-display>
|
|
|
|
```
|
|
|
|
|
|
|
|
This code will retrieve the data from the uri assigned to the data-src attribute and display all fields present in the field attribute.
|
|
|
|
See the full explanation on [the doc of SiB Display](Components/SiB-Display).
|
|
|
|
|
|
|
|
## Default component available in the core
|
|
|
|
|
|
|
|
By importing the Startin'blox core, the following main components are available :
|
|
|
|
|
|
|
|
* [SiB Display](Components/SiB-Display) - To display datas
|
|
|
|
* [SiB Form](Components/SiB-Form) - To display a form
|
|
|
|
* [SiB Delete](Components/SiB-Delete) - To delete datas
|
|
|
|
* [SiB Ac Checker](Components/SiB-Ac-Checker) - To manage permission
|
|
|
|
* [Sib Widget](Components/SiB-Widget) - To custom your rendering
|
|
|
|
* [SiB Calendar](Components/SiB-Calendar) - To display a calendar
|
|
|
|
* [SiB Map](Components/SiB-Map) - To display a map
|
|
|
|
|
|
|
|
|
|
|
|
## Imagine your components !
|
|
|
|
There is [a tutorial](./How to make components ?) to learn how to create your own components.
|
|
|
|
|
|
|
|
If you have any difficulties, don't hesitate to ask people on [our chat](community.startinblox.com) :) |
|
|
\ No newline at end of file |