Canvas Design System
Main Site Tokens

Prompt Select

An inline label + dropdown pair for contextual navigation prompts. Pairs a serif-italic prompt with a branded select dropdown for quick, conversational navigation.

When to Use

Use Prompt Select when: You want a conversational, inline prompt that guides users to a destination via a dropdown. Ideal for hero sections, landing pages, and contextual navigation where the action reads like a sentence ("I need help with [Goal]").
Don't use when: The user needs to fill in a form field — use Select instead. For navigation with more than 6-8 options, consider a search input or a dedicated listing page.

Default

The standard prompt select with the primary red border and serif-italic label.

I need help with
<?= ws_prompt_select('I need help with', 'goalSelect', [
    '' => 'Goal...',
    'team-building' => 'Team Building',
    'ideation' => 'Ideation',
], ['onchange' => 'goToGoal(this)']) ?>

With Navigation

Use the onchange option to navigate when a selection is made.

Most popular
<?= ws_prompt_select('Most popular', 'popularSelect', [
    '' => 'Workshops, exercises...',
    'workshops' => 'Workshops',
    'exercises' => 'Exercises',
    'icebreakers' => 'Icebreakers',
], ['onchange' => 'goToPopular(this)']) ?>

Muted Variant

A softer version with a gray border and muted label, for secondary or less prominent prompts.

Filter by
<?= ws_prompt_select('Filter by', 'filterSelect', [
    '' => 'Category...',
    'design' => 'Design',
    'leadership' => 'Leadership',
], ['variant' => 'muted']) ?>

Responsive Behaviour

Below 480px, the component stacks vertically. The label sits above the dropdown with reduced font size.

I need help with

Parameters

ParameterTypeDefaultDescription
$labelstringPrompt text (displayed in serif italic)
$namestringSelect field name and default ID
$selectOptionsarrayKey-value pairs of value => label
valuestring''Pre-selected value
onchangestring''JavaScript onchange handler
idstring$nameElement ID
classstring''Additional CSS classes on wrapper
variantstring'default''default' | 'muted'

Anatomy

.ws-prompt-select — Outer flex wrapper
.ws-prompt-select__label — Serif italic prompt text
.ws-prompt-select__dropdown — Select container (flex: 1, max-width: 320px)
.ws-prompt-select__select — Native <select> with branded styling

CSS Classes

ClassPurpose
.ws-prompt-selectBase wrapper (flex row, centered)
.ws-prompt-select--mutedMuted variant (gray border, subdued label)
.ws-prompt-select__labelSerif italic prompt label
.ws-prompt-select__dropdownDropdown container
.ws-prompt-select__selectStyled native select element

Files

FilePurpose
includes/components/helpers.phpws_prompt_select() helper function
includes/components/prompt-select.phpComponent template
includes/components/components.cssPrompt Select CSS (.ws-prompt-select rules)