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:
| State | Row renders as |
|---|---|
| Listings disabled for members | locked — "Members can't list products / host events here yet." |
| Not signed in | a sign-in row → /login |
| Signed in, not an approved member | locked — "Only community members can list products / host events." |
| Approved member | active — 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
| Attribute | Default | Notes |
|---|---|---|
data-tag | — (required) | your community tag |
data-product-label | List a product | row label (localise here) |
data-event-label | Host an event | row 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.