Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Widgets

Widgets are used on the Quokka Admin Dashboard and in the sidebar. To control these you use the quokka_admin::data::dashboard_widget::AdminDashboardWidget and quokka_admin::data::sidebar_widget::AdminSidebarWidget respectively.

You would use the AdminState::add_sidebar_widget and AdminState::add_dashboard_widget to add the widgets to whatever slot you want to add them. The Admin Widget structs come with a htmx constructor which takes a URL to which they will make a request. The response should return valid HTML which will then be inserted to their slots. With a .hx_trigger("load, every 1s") you can also set up a refresh for every second in case you want to have your widget refreshed.