Embeddable web component

Bring Wine Knowledge to Your Website

Add clear, interactive wine cards to any page. One script tag, no extra dependencies, and flexible styling.

See how it works

See it in action

These live cards use the same wine data as Wine Companion.

Random · Flip
Random · Crossfade
Dark theme · Scale + blur

Quick start

Add two lines of HTML and the first card is ready.

<script type="module"
  src="https://companion.decodewine.com/widget/wine-companion-widget.js">
</script>

<wine-card type="grape" random rotate-interval="10"></wine-card>

Configuration

Tune the content, language, theme, and motion with HTML attributes or one global configuration.

AttributeTypeDefaultDescription
typestring"grape"Card type: grape, blend, aroma, winemaking or country
slugstring—Choose a specific item by slug
randombooleanfalseShow a random item of the type
difficultystring—Filter by beginner, intermediate, or advanced
localestring"en"Language: en or de
themestring"light"Theme: light or dark
rotate-intervalnumber—Rotate automatically after this many seconds
transitionstring"flip"flip, crossfade, slide, or scale-blur
transition-durationnumbervariesAnimation duration in milliseconds
base-urlstringcompanion.decodewine.comData source URL
opacitynumber1Card opacity from 0 to 1; values below 1 add backdrop blur

Global Configuration

Set defaults for all widgets on the page:

JavaScript
<script>
  window.WineCompanionConfig = {
    locale: 'de',
    theme: 'dark',
    transition: 'flip',
    transitionDuration: 600,
    opacity: 0.85
  };
</script>

Smooth transitions

Four built-in rotation animations. Pick the one that fits your site.

flip

3D Flip

Turn the card to reveal the next profile. This is the default.

crossfade

Crossfade

Fade gently from one profile to the next.

slide

Slide

Bring each new card in from below.

scale-blur

Scale + Blur

Shrink, soften, then settle the next card into place.

Made for

Wine Blogs

Give readers a clear grape profile beside the story.

Wine Shops

Explain a bottle's grape varieties right on the product page.

Education

Add rotating grape cards to lessons and course pages.

Restaurants

Feature a wine or grape of the day on a digital menu.