Where to get example codes for widgets in the docs?


I am trying to get some code examples for widgets to use in my views, right now I am on this page:


But cannot find anything related to an example of a full widget.

Also, just to make sure I understand the principle of a widget in Yii 2, is it always a table with rows and columns or can it be something else?

Thank you,


A widget can be everything you want. ;)

See here:



Always have this 2 things open in your browser.

  1. The Guide (link above)

  2. The API Documentation (link you posted)


I see, I understand, he guide is really what I need to follow as a beginner, the API for now is a bit hard for me to follow but the link you gave about the guide is great and perfect for my requirements.

I am now understanding more how the docs work, a bit confusing at first I have to admit…:slight_smile: