Widget Anatomy
Every widget follows similar UI structure where its mostly composed with Header, Body and Footer component. Every widget is capable enough to either extend default component with your own custom tweaks or render your own custom component in place of these default rendered sub component.
Header Component
Every widget header component is defaulted to LLWidgetHeader. It is responsible for rendering:
- Timer component (defaulted to LLWidgetInteractiveTimer) incase widget is interact-able for certain time period only.
- Title of the widget.
- Dismiss button incase widget is dismissible.
Body Component
Body component forms the core UI of a widget and that's the reason it is different for every widget where you could still extend default corresponding widget body component to quickly customise widget core UI. For example:
- Poll & Prediction based widget: It renders selectable poll options and poll results.
- Quiz based widget: It renders selectable quiz choices, results and vote numbers.
- Number Prediction based widget: It renders options, number inputs and vote results.
- Slider based widget: It renders slider UI
- Cheer meter widget: It renders pressable options
For more details on the body component, refer corresponding widget BodyComponent
prop documentation for more details.
Footer Component
Every widget footer is defaulted to LLWidgetFooter. It is responsible for rendering:
- Submit button in case widget is one time interact-able for example quiz, emoji slider, number prediction etc.
- Widget Rewards
- Widget End phase Label in case widget interactivity is timed out or widget gets expired.
- Widget sponsors.
Updated 12 months ago