To use Izmir, load its CSS file, place an image and caption inside a figure, and add effect classes to that component. If an effect fails, check those three pieces before changing your JavaScript: the basic library runs in CSS.
This guide accompanies the working Izmir examples and downloads. It documents the open-source library by Ciaran Walsh; the original code remains available in the upstream repository.
1. Put the stylesheet where your page can load it
Copy izmir.min.css into your own project and include it once in the document head. In this illustration, the file lives in a folder called css:
<link rel="stylesheet" href="/css/izmir.min.css">
Open that URL directly in a browser. You should receive CSS, not a login screen, a missing-page template or an HTML document returned with a successful status. In WordPress, enqueue the stylesheet from a theme or plugin rather than pasting a new stylesheet tag into every paragraph.
2. Start with one plain component
<figure class="c4-izmir" tabindex="0">
<img src="images/workspace.webp"
alt="A sketchbook and laptop on a desk"
width="800" height="600">
<figcaption>
<h3>Inside the project</h3>
<p>A short description of what the image shows.</p>
</figcaption>
</figure>
Use an image you are entitled to publish, with dimensions appropriate to the card. The width and height describe the image’s proportions; responsive CSS can still scale it down. Confirm that the plain component works before adding several animations.
3. Add one effect at a time
Add c4-image-zoom-in to the figure for an image treatment, then try c4-border-bottom for a border. Put c4-fade-up on the heading when you want the text to have its own motion.
<figure class="c4-izmir c4-image-zoom-in c4-border-bottom" tabindex="0">
...
<figcaption><h3 class="c4-fade-up">Inside the project</h3></figcaption>
</figure>
Change the image, border and caption separately. If you alter all three together, an unexpected result is harder to trace. For a useful comparison, keep the same photograph and caption while trying different combinations.
4. Check keyboard, touch and reduced motion
Tab to the demonstration and verify that the caption appears. On a real card that opens a page, use a genuine link with descriptive link text and inspect its focus state. A clickable picture with no usable keyboard action is an incomplete component.
For touch screens, keep any essential caption available without a hover gesture. Respect reduced-motion preferences with a scoped override. The following is a starting point for a component you have already tested; it is not a complete accessibility audit:
@media (prefers-reduced-motion: reduce) {
.c4-izmir, .c4-izmir * {
transition: none !important;
animation: none !important;
}
}
When something looks wrong
| Symptom | First check |
|---|---|
| No effect at all | Does the stylesheet URL return CSS, and is the base class spelled c4-izmir? |
| The image appears but the caption does not | Is the figcaption inside the figure? Test focus as well as hover. |
| The card changes size during loading | Give the image its correct dimensions and check the card’s responsive width. |
| A caption is cut off | Try the longest real text at the narrowest supported width; adjust layout or reduce the content. |
| A theme overrides the component | Inspect the winning CSS rule in developer tools. Apply a local fix rather than changing every image on the site. |
Finish with your real content rather than the sample image. A card is ready when its message remains clear before, during and after the effect—and when its actual action works.