Reference
Everything the widget accepts and everything it renders. The embed builder writes the attributes for you; this page is for when you want to hand-edit a snippet or restyle the result.
Data attributes
| Attribute | Required | What it does |
|---|---|---|
data-kanu-widget | Yes | Marker attribute (no value needed). Identifies the container. |
data-supabase-url | Yes | Your Supabase project URL. |
data-supabase-key | Yes | Your Supabase anon (public) key. |
data-base-url | No | Base URL for card links. Defaults to https://needs.kanuhawaii.org . |
data-islands | No | Comma-separated island slugs (e.g. “oahu,maui,hawaii”). |
data-causes | No | Comma-separated cause slugs. |
data-activity-types | No | Comma-separated activity type slugs. |
data-good-for | No | Comma-separated good-for tag slugs. |
data-campaign-id | No | Campaign UUID — overrides filter slugs. |
data-malama-hawaii | No | Set to “true” to show only Mālama Hawaiʻi organizations. |
data-turnstile-site-key | No | Cloudflare Turnstile site key, which turns on the captcha in the sign-up form. Public by design. Leave it out and sign-ups still work, under a tighter rate limit. |
data-limit | No | Cards per page: how many show at first, and how many each Load more adds (default: 12). |
data-more | No | What sits under the feed. “link” (the default) links to all opportunities on Kanu with the visitor’s filters; “load” shows a Load more button that adds the next page in place. |
data-show-count | No | Show “N opportunities in the next 6 months” above the feed. Counts every date an opportunity meets in that window (a weekly one counts about 26 times), plus each open-ended opportunity once, under the current filters. Set to “false” to hide (default: true). |
data-card-per-date | No | One card per day an opportunity meets, soonest first, instead of one card per opportunity with a few date chips. Opening a card picks that date in the sign-up form. Set to “true” (default: false). |
data-open-ended-every | No | Every Nth card is an ongoing, open-ended opportunity, sprinkled between the dated ones the way needs.kanuhawaii.org does (default: 5, so four dated cards then one ongoing). Set to “0” to list open-ended opportunities after every dated card instead. Which open-ended ones come first changes once a day. |
data-show-search | No | Show search bar. Set to “false” to hide (default: true). |
data-show-filters | No | Show interactive filter dropdowns (island, cause, activity, good-for). Set to “true” to show (default: false). The configurator above turns this on for you. |
data-island-tabs | No | Show a row of island tabs across the top. Set to “true” to show (default: false). Replaces the island dropdown, so the same choice is not offered twice. |
data-date-filter | No | Show a date picker built for trip planning: one-click presets (this weekend, next weekend, next 7 and 30 days, and each of the next 12 months) beside a calendar that only offers future days. Set to “true” to show (default: false). A recurring opportunity matches when any of its dates falls in the range. It sits on the same row as the search bar. |
data-malama-filter | No | Show a Mālama Hawaiʻi certified toggle the visitor can press. Set to “true” to show (default: false). Ignored when data-malama-hawaii is already “true”, since the feed is restricted anyway. |
data-date-type-filter | No | Show Recurring / Include open-ended / One time checkboxes. Set to “true” to show (default: false). Opens on recurring and one time, so open-ended opportunities are left out until a visitor ticks them. |
The order of the cards
The widget orders opportunities the way needs.kanuhawaii.org does:
- Soonest first. Dated opportunities are listed by the next day they meet.
- Rarer first within a day. On any one day, an opportunity that happens once comes before one that meets every week, and that comes before one that meets every day. A Saturday beach cleanup leads a daily food-bank shift on that Saturday, instead of being buried under it.
- Ongoing ones sprinkled in. Open-ended opportunities have no date to sort by, so every fifth
card is one of them (change or turn this off with
data-open-ended-every). Which ones come first changes once a day, so each gets its turn near the top.
Making it match your site
The widget uses class names prefixed kanu-w-, scoped under a .kanu-widget-root container.
Override any of them by adding CSS after the widget script loads. All the class names below are
stable and safe to target.
The widget injects its own styles as a <style id="kanu-widget-styles"> tag in the document head,
so your site’s CSS naturally wins when it comes after. If you need to replace the defaults
entirely, remove that element once the script has loaded.
The sign-up modal is attached to the page <body> and carries the .kanu-widget-root class too,
so a rule scoped to .kanu-widget-root or to a bare .kanu-w- class styles the modal as well as
the cards.
CSS classes
| Class | Element |
|---|---|
.kanu-widget-root | Outer container — set font-family, color, max-width here |
.kanu-w-toolbar | The row holding the search bar and the date picker side by side; wraps on a phone. Put spacing below the controls here |
.kanu-w-search | Search bar wrapper |
.kanu-w-search input | Search input field |
.kanu-w-filters | Filter dropdown row (flex container) |
.kanu-w-filter-select | Individual filter dropdown |
.kanu-w-grid | Card grid (CSS Grid) |
.kanu-w-card | Individual card link |
.kanu-w-card-img | Card image area |
.kanu-w-card-img img | Card image element |
.kanu-w-card-img-placeholder | Stand-in shown when an opportunity has no image |
.kanu-w-dates | Date chip group, top-left over the image |
.kanu-w-date | One date chip |
.kanu-w-date--mini | The smaller chips for later dates |
.kanu-w-date--open | The chip shown when there is no fixed date (OPEN / RECURRING) |
.kanu-w-date-month | Month line inside a date chip |
.kanu-w-date-day | Day number inside a date chip |
.kanu-w-date-year | Year line inside the first date chip |
.kanu-w-islands | Island badge group, top-right over the image |
.kanu-w-island | One island badge, and the “+N” overflow badge |
.kanu-w-island--oahu, --maui, --kauai, --hawaii, --molokai, --lanai, --remote | Per-island class on each badge, so islands can be coloured individually |
.kanu-w-island--more | The “+N” overflow badge specifically |
.kanu-w-island-icon | The island’s silhouette inside its badge |
.kanu-w-card-body | Card text content area |
.kanu-w-card-title | Card title text |
.kanu-w-org | Organization row (logo plus name) |
.kanu-w-org-logo | Organization logo image |
.kanu-w-org-logo--initial | Stand-in circle when the organization has no logo |
.kanu-w-card-org | Organization name text |
.kanu-w-card-desc | Description text |
.kanu-w-tags | Tag pill group under the description |
.kanu-w-tag | One tag pill. Causes, activity types and good-for all share this class, so a single rule recolours every tag |
.kanu-w-dp | Date picker wrapper (data-date-filter) |
.kanu-w-dp-trigger | The button showing “Any dates” or the chosen range |
.kanu-w-dp-clear | The × that clears the dates |
.kanu-w-dp-pop | The picker popover |
.kanu-w-dp-preset | One preset (a weekend, a month); .kanu-w-dp-preset--active when chosen |
.kanu-w-dp-day | One calendar day; --start, --end and --in mark the range, --today today |
.kanu-w-count | The “N opportunities in the next 6 months” line above the grid |
.kanu-w-more | Load more button row (data-more=“load”) |
.kanu-w-more-btn | The Load more button |
.kanu-w-malama | Wrapper around the Mālama Hawaiʻi badge and its tooltip. On a card it sits under the description, above the tags |
.kanu-w-malama-badge | “Mālama Hawaiʻi certified” pill on a card and in the modal |
.kanu-w-tip | The tooltip explaining Mālama Hawaiʻi, shown on hover (and on focus in the modal) |
.kanu-w-cta | Footer CTA link container |
.kanu-w-cta a | CTA link |
.kanu-w-loading | Loading state wrapper |
.kanu-w-spinner | Loading spinner |
.kanu-w-empty | Empty state wrapper |
.kanu-w-error | Error state wrapper |
.kanu-w-modal-overlay | Sign-up modal backdrop. Also carries .kanu-widget-root |
.kanu-w-modal | Sign-up modal panel |
.kanu-w-modal-body | Scrolling content area inside the panel |
.kanu-w-modal-tabs | Details / Organization / Register tab row |
.kanu-w-modal-tab | One tab button |
.kanu-w-modal-tab--active | The selected tab |
.kanu-w-modal-panel | A tab panel (the hidden one carries [hidden]) |
.kanu-w-modal-actions | The Details panel’s button row |
.kanu-w-modal-close | Modal close (X) button |
.kanu-w-modal-img | Modal image area |
.kanu-w-modal-org | Organization name above the modal title; opens the Organization tab |
.kanu-w-facts | Details list: when, causes, activities, good for, requirements, minimum age, where |
.kanu-w-fact | One row of that list (a dt label and a dd value) |
.kanu-w-schedule | The upcoming dates and shift times inside the When row |
.kanu-w-org-head | Logo and name at the top of the Organization tab |
.kanu-w-org-links | Website and social links on the Organization tab |
.kanu-w-modal-title | Modal opportunity title |
.kanu-w-modal-meta | Modal date/island line |
.kanu-w-modal-desc | Modal description text |
.kanu-w-modal-form-area | Wrapper around the form or the full sign-up hand-off |
.kanu-w-modal-note | Explanation shown when sign-up must finish on Kanu |
.kanu-w-modal-fulllink | Link out to the full sign-up page on Kanu |
.kanu-w-form | Registration form (flex container) |
.kanu-w-field | One label plus input pair inside the form |
.kanu-w-label | Form field label |
.kanu-w-input | Form text/number input |
.kanu-w-textarea | Form message textarea |
.kanu-w-checkbox | Form consent checkbox row |
.kanu-w-btn | Primary button (Register / full sign-up) |
.kanu-w-btn--secondary | Secondary button (Close) |
.kanu-w-form-error | Inline form error message |
.kanu-w-form-success | Post-submit success state |
.kanu-w-success-title | Headline inside the success state |
Example: match your brand colours
/* Add this to your site, after the widget loads */
.kanu-widget-root {
font-family: 'Your Brand Font', sans-serif;
}
/* The accent: search focus, active tab, CTA */
.kanu-w-search input:focus {
border-color: #your-brand-color;
box-shadow: 0 0 0 3px rgba(your-r, your-g, your-b, 0.1);
}
.kanu-w-tab--active {
background: #your-brand-color;
border-color: #your-brand-color;
}
.kanu-w-cta a {
color: #your-brand-color;
}
/* The grid */
.kanu-w-grid {
grid-template-columns: repeat(2, 1fr); /* always two columns */
gap: 12px;
}
.kanu-w-card {
border-radius: 8px;
}Example: a dark background
.kanu-widget-root {
color: #e0e0e0;
}
.kanu-w-card {
background: #1e1e1e;
border-color: #333;
}
.kanu-w-card-org {
color: #aaa;
}
.kanu-w-card-desc {
color: #ccc;
}
.kanu-w-search input {
background: #2a2a2a;
border-color: #444;
color: #e0e0e0;
}
.kanu-w-tab {
background: #2a2a2a;
border-color: #444;
color: #ccc;
}Mālama Hawaiʻi is a complete worked example: a full theme measured off a live WordPress site, in one snippet.