Partners can fully customize the appearance of the Opportunities widget without forking code. Use custom attributes on the <legion-opportunities> element to pass values that map to CSS variables inside the widget iframe.
For an interactive customization experience with live preview, visit:
/widgets/opportunities/customize
1<legion-opportunities
2 count="5"
3 layout="horizontal"
4 base-url="https://your-domain.com"
5 opp-panel-start="0.6"
6 opp-panel-mid="0.45"
7 opp-panel-end="0.25"
8 opp-panel-shadow="0 8px 28px rgba(0,0,0,.45)"
9 opp-title-size="clamp(18px, 3vmin, 40px)"
10 opp-title-color="#ffffff"
11 opp-description-size="clamp(13px, 1.8vmin, 20px)"
12 opp-expires-size="clamp(11px, 1.4vmin, 16px)"
13>
14</legion-opportunities>Notes:
base-url should point to your Legion deployment domain.Use the theme attribute for quick preset styling:
| Theme | Description |
|---|---|
light | Default light theme |
dark | Higher contrast dark overlay |
minimal | Subtle overlay, no shadows |
bold | High contrast, larger typography |
corporate | Professional, minimal animations |
vibrant | Colored overlay with glow effects |
<legion-opportunities theme="bold" count="5" base-url="https://your-domain.com">
</legion-opportunities>| Attribute | Type | Default | Description |
|---|---|---|---|
count | number | 5 | Number of opportunities (1-20) |
layout | string | horizontal | "horizontal" or "vertical" |
tags | string | - | Comma-separated filter tags |
theme | string | light | Preset theme name |
height | string | auto | "auto", "100%", or specific px |
base-url | string | current origin | Your deployment URL |
api-key | string | - | Optional API key |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-panel-start | --opp-panel-start-alpha | 0.6 | Gradient start opacity (0-1) |
opp-panel-mid | --opp-panel-mid-alpha | 0.45 | Gradient mid opacity (0-1) |
opp-panel-end | --opp-panel-end-alpha | 0.25 | Gradient end opacity (0-1) |
opp-panel-color | --opp-panel-color | 0, 0, 0 | Panel RGB color |
opp-panel-shadow | --opp-panel-shadow | 0 8px 28px rgba(0,0,0,0.45) | Panel box-shadow |
opp-panel-blur | --opp-panel-blur | 2px | Backdrop blur |
opp-panel-radius | --opp-panel-radius | 10px | Panel border radius |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-card-radius | --opp-card-radius | 12px | Card border radius |
opp-card-shadow | --opp-card-shadow | 0 10px 30px rgba(0,0,0,0.35) | Card box-shadow |
opp-card-border | --opp-card-border | none | Card border |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-title-size | --opp-title-size | clamp(18px, 2.6vmin, 36px) | Font size |
opp-title-color | --opp-title-color | #ffffff | Text color |
opp-title-weight | --opp-title-weight | 800 | Font weight |
opp-title-shadow | --opp-title-shadow | 0 3px 14px rgba(0,0,0,0.85) | Text shadow |
opp-title-font-family | --opp-title-font-family | inherit | Font family |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-description-size | --opp-description-size | clamp(13px, 1.8vmin, 19px) | Font size |
opp-description-color | --opp-description-color | rgba(255,255,255,0.95) | Text color |
opp-description-shadow | --opp-description-shadow | 0 2px 10px rgba(0,0,0,0.7) | Text shadow |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-expires-size | --opp-expires-size | clamp(11px, 1.4vmin, 15px) | Font size |
opp-expires-color | --opp-expires-color | rgba(255,255,255,0.85) | Text color |
opp-expires-shadow | --opp-expires-shadow | 0 1px 8px rgba(0,0,0,0.7) | Text shadow |
| Attribute | CSS Variable | Default | Description |
|---|---|---|---|
opp-transition-duration | --opp-transition-duration | 0.3s | Animation speed |
opp-animation-scale | --opp-animation-scale | 1.02 | Hover scale (1 = none) |
1<legion-opportunities
2 count="3"
3 base-url="https://your-domain.com"
4 opp-panel-start="0.75"
5 opp-panel-mid="0.55"
6 opp-title-size="clamp(22px, 3.2vmin, 44px)"
7>
8</legion-opportunities>1<legion-opportunities
2 count="3"
3 base-url="https://your-domain.com"
4 opp-panel-start="0.4"
5 opp-panel-mid="0.3"
6 opp-panel-end="0.15"
7 opp-panel-shadow="0 6px 18px rgba(0,0,0,.3)"
8>
9</legion-opportunities>1<legion-opportunities
2 count="5"
3 base-url="https://your-domain.com"
4 opp-panel-color="30, 41, 59"
5 opp-panel-start="0.9"
6 opp-card-radius="4px"
7 opp-animation-scale="1"
8>
9</legion-opportunities>Add this script to your theme's header.php or use a plugin like "Header Footer Code Manager":
<script src="https://your-domain.com/js/opportunities-widget.js"></script>Gutenberg/Block Editor: Use a "Custom HTML" block and paste the widget code.
Classic Editor: Switch to "Text" mode (not Visual) and paste the code.
Elementor: Use the "HTML" widget and paste the complete embed code.
Widget Areas: Use a "Custom HTML" widget in your sidebar or footer.
1<!-- Add to Custom HTML block or widget -->
2<legion-opportunities
3 count="5"
4 layout="horizontal"
5 base-url="https://your-domain.com"
6 theme="bold"
7>
8</legion-opportunities>clamp() for sizes to keep text readable across different embed sizes./widgets/opportunities/customize for real-time preview.