Browse docs
Browse docs
Released 2026-08-14
Adds the <Image> primitive. Only @dashforge/tw advances — the
tw-theme / tw-tokens pair stays on 1.2.0 (no token or theme-runtime
change).
No breaking changes. Every existing consumer works unchanged — the
addition is purely additive on top of the 1.2.0 surface.
| Package | Change |
|---|---|
@dashforge/tw | 1.2.0 → 1.3.0. New <Image> primitive; fixed a drifted exported VERSION constant. |
@dashforge/tw-theme | unchanged — stays 1.2.0. |
@dashforge/tw-tokens | unchanged — stays 1.2.0. |
<Image>A thin, declarative wrapper over the native <img>. Zero eval, no data
fetching — it renders a URL you give it and adds the three things a bare
<img> lacks:
aspectRatio (or width + height) reserves the
box before load via CSS aspect-ratio — no JS measurement, no reflow
when the image arrives..complete at mount, so
no flash).fallback.loading="lazy"); native <img> attributes
(srcSet, sizes, decoding, …) are forwarded.fit (CSS object-fit) and rounded are Option C configurable via
theme.components.Image.defaults; sx / slotProps cover per-instance and
per-slot overrides.
patchTheme({ components: { Image: { defaults: { rounded: 'md', fit: 'cover' } } } });
<Image src={photo} alt="Product" aspectRatio={16 / 9} rounded="lg" />It also supports access (RBAC) and visibleWhen gating like the
form components — onUnauthorized: 'hide' removes the image, 'disable' /
'readonly' render it dimmed and non-interactive.
Full docs + live demos: Components → Image.
VERSION constant had drifted to 1.1.1; it now tracks the
package version.Drop-in for everything already using 1.2.0. The addition is opt-in;
nothing renamed, nothing removed. tw-theme / tw-tokens do not need to
move.
pnpm update @dashforge/tw| Peer | Required range |
|---|---|
react | ^18.0.0 || ^19.0.0 |
react-dom | ^18.0.0 || ^19.0.0 |
tailwindcss | ^3.4.0 |
@dashforge/tw-theme | ^1.2.0 |
@dashforge/tw-tokens | ^1.2.0 |
@dashforge/forms | ^1.0.0 |
@dashforge/ui-core | ^1.0.0 |
@dashforge/rbac | ^1.0.0 |
No new runtime dependencies.