This is the API documentation for our Widgets. Widgets are interactive components that can be added to web pages to enhance user engagement and experience.
Usage
To use our Widgets API, you will need to make GET requests to the appropriate endpoints.
Endpoint
Example Request
curl -X GET "https://example.com/en/docs/api/widgets"
Available Widgets
Here are some of the widgets available:
- Button - A clickable button that can be used for a variety of actions.
- Slider - Allows users to select a value by sliding a handle.
- Dropdown - A dropdown list that allows users to select an item from a list of options.
Button
The Button widget is designed to be used as a simple call to action.
Properties
- text - The text displayed on the button.
- action - The action to perform when the button is clicked.
Example Usage
<widget-button text="Click Me!" action="/do-something"></widget-button>
Slider
The Slider widget allows users to select a value by moving a handle.
Properties
- min - The minimum value for the slider.
- max - The maximum value for the slider.
- value - The current value of the slider.
Example Usage
<widget-slider min="0" max="100" value="50"></widget-slider>
Dropdown
The Dropdown widget is a dropdown list that allows users to select an item from a list of options.
Properties
- options - An array of options to display in the dropdown.
- selected - The index of the selected option.
Example Usage
<widget-dropdown options="[{"value": "Option 1", "text": "Option 1"}, {"value": "Option 2", "text": "Option 2"}]" selected="0"></widget-dropdown>
Learn More
For more information about our Widgets API, please refer to the full documentation.
Widget Example