Widgets
Create

Create widget

A "+" button that opens an action sheet letting an approved member list a product or host an event in your community — the same quick-create the Cobuntu app surfaces, dropped into your own header.

The button is always shown; rows the visitor can't use render locked with a short reason, so the experience stays consistent for everyone.

Install

<div data-cobuntu-create data-tag="<community-tag>"></div>
 
<!-- bottom of <body>, alongside the other widget scripts -->
<script src="https://app.cobuntu.com/widgets/v1/create.js" async></script>

Behaviour

Per row, the widget checks the community's listing settings + the visitor's membership, in order:

StateRow renders as
Listings disabled for memberslocked — "Members can't list products / host events here yet."
Not signed ina sign-in row → /login
Signed in, not an approved memberlocked — "Only community members can list products / host events."
Approved memberactive — opens /marketplace/new or /events/new

The destination pages re-check every rule, so a locked action can never be reached by deep-linking.

Data attributes

AttributeDefaultNotes
data-tag— (required)your community tag
data-product-labelList a productrow label (localise here)
data-event-labelHost an eventrow label (localise here)

Styling

Themes off the shared --cobuntu-* variables (see Theming). The button uses --cobuntu-bg, --cobuntu-color, --cobuntu-hover-color; the sheet uses --cobuntu-drawer-bg, --cobuntu-drawer-text, --cobuntu-font. Unset variables fall back to neutral defaults.

The widget re-checks state every 60s, so a sign-in or a newly approved membership updates the sheet without a page reload.