Word with twinkling stars in WordPress
A highlighted word in a heading, around which small stars fade in and out as they twinkle.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Mot entouré d’étoiles scintillantes
* Description: Un mot mis en avant dans un titre, autour duquel de petites étoiles apparaissent et disparaissent en scintillant. Ajoute la composition « Mot entouré d’étoiles scintillantes » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-effet-etoiles-scintillantes
*<!-- wp:group {"className": "efes", "layout": {"type": "default"}} -->
<div class="wp-block-group efes"><!-- wp:paragraph {"className": "efes__eyebrow"} -->
<p class="efes__eyebrow">Pâtisserie Maison Delmas · Commandes de Noël ouvertes</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<h2 class="efes__title">Une fin d’année qui <span class="efes__word">scintille<span class="efes__stars" aria-hidden="true">
<svg class="efes__star efes__star--1" viewBox="0 0 24 24" focusable="false"><path d="M12 0C12 6.6 17.4 12 24 12C17.4 12 12 17.4 12 24C12 17.4 6.6 12 0 12C6.6 12 12 6.6 12 0Z"/></svg>
<svg class="efes__star efes__star--2" viewBox="0 0 24 24" focusable="false"><path d="M12 0C12 6.6 17.4 12 24 12C17.4 12 12 17.4 12 24C12 17.4 6.6 12 0 12C6.6 12 12 6.6 12 0Z"/></svg>
<svg class="efes__star efes__star--3" viewBox="0 0 24 24" focusable="false"><path d="M12 0C12 6.6 17.4 12 24 12C17.4 12 12 17.4 12 24C12 17.4 6.6 12 0 12C6.6 12 12 6.6 12 0Z"/></svg>
<svg class="efes__star efes__star--4" viewBox="0 0 24 24" focusable="false"><path d="M12 0C12 6.6 17.4 12 24 12C17.4 12 12 17.4 12 24C12 17.4 6.6 12 0 12C6.6 12 12 6.6 12 0Z"/></svg>
</span></span></h2>
<!-- /wp:html -->:root {
--efes-text: #1f1b16;
--efes-body: #57534e;
--efes-word: #9f1239;
--efes-star: #d97706;
--efes-accent: #9f1239;
--efes-on-accent: #ffffff;
--demo-effet-etoiles-scintillantes-bg: #fffbeb;
--demo-effet-etoiles-scintillantes-text: #1f1b16;
}
@media (prefers-color-scheme: dark) {Free component: copy it freely, including for commercial projects.
Other visual effects components in WordPress
Visual effects components in WordPress
A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
- Tailwind
- React
- CSS
- WordPress

Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.
- Tailwind
- React
- CSS
- WordPress

A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.
- Tailwind
- React
- CSS
- WordPress

A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.
- Tailwind
- React
- CSS
- WordPress

A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.
- Tailwind
- React
- CSS
- WordPress

Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.
- Tailwind
- React
- CSS
- WordPress