3D icon set
Twelve fully-inline-SVG icons — rocket, chart, shield, cloud and friends — with soft two-to-three-stop gradients, a white edge highlight and an elliptical ground shadow under every object; hover tilts with your pointer and one segment recolours the whole set from violet to amber to mint.
Real scenarios
The component as it is used in a product — not a specimen grid.
Twelve icons, one language
Every icon is pure inline SVG on a 64×64 grid: two shared gradients, a white edge highlight and an elliptical ground shadow. Move the pointer across a tile — it tilts with you — and flip the segment to recolour the whole set.
One language, every size
The same gradients hold up from a 22px inline button icon to a 108px display piece — stroke-free geometry and a shared gloss keep the edges clean at any scale.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| theme | segment | 'violet' | Three themes: violet · amber · mint; the segment flips four colour variables and both shared gradients recolour at once. |
| tilt | deg | '±12°' | The tilt reads the pointer position onto rotateX/rotateY; letting go springs back to zero. |
| stops | count | '2–3' | Every surface carries two to three soft stops — body, accent, and one shared gloss gradient for the edge highlight. |
| ground-shadow | shape | 'ellipse' | A soft elliptical shadow under each object builds the depth — no heavy filters, just one shared radial gradient. |
| viewBox | grid | '64 × 64' | Every icon is drawn on a 64×64 grid and stays crisp up to a 112px display size. |
Snippet
<!-- Once for the whole set: two shared gradients + the radial shadow -->
<svg width="0" height="0" aria-hidden="true"><defs>
<linearGradient id="i3ds-body" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" class="i3ds-s1"/><stop offset="1" class="i3ds-s2"/>
</linearGradient>
<linearGradient id="i3ds-accent" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" class="i3ds-s3"/><stop offset="1" class="i3ds-s4"/>
</linearGradient>
<radialGradient id="i3ds-shadow">
<stop offset="0" stop-color="#0f172a" stop-opacity=".26"/>
<stop offset="1" stop-color="#0f172a" stop-opacity="0"/>
</radialGradient>
</defs></svg>
<div class="i3ds" x-data="{
theme: 'violet',
tilt(e) {
const el = e.currentTarget, r = el.getBoundingClientRect();
el.style.setProperty('--i3ds-rx', ((0.5 - (e.clientY - r.top) / r.height) * 12) + 'deg');
el.style.setProperty('--i3ds-ry', (((e.clientX - r.left) / r.width - 0.5) * 14) + 'deg');
},
reset(e) {
e.currentTarget.style.removeProperty('--i3ds-rx');
e.currentTarget.style.removeProperty('--i3ds-ry');
},
}" :data-theme="theme">
<div class="i3ds-seg" role="radiogroup" aria-label="Colour theme">
<button type="button" role="radio" :aria-checked="theme === 'violet'"
x-on:click="theme = 'violet'">Violet</button>
<button type="button" role="radio" :aria-checked="theme === 'amber'"
x-on:click="theme = 'amber'">Amber</button>
<button type="button" role="radio" :aria-checked="theme === 'mint'"
x-on:click="theme = 'mint'">Mint</button>
</div>
<div class="i3ds-grid">
<div class="i3ds-cell" x-on:pointermove="tilt($event)" x-on:pointerleave="reset($event)">
<svg viewBox="0 0 64 64" role="img" aria-label="Rocket">
<ellipse class="i3ds-sh" cx="32" cy="55" rx="15" ry="4.5"/>
<path d="M27.5 45h9c.3 3.5-1.7 6.5-4.5 9.5-2.8-3-4.8-6-4.5-9.5Z" fill="url(#i3ds-accent)"/>
<path d="M23 33c-5.5 3-8.5 8.5-8.5 15l8.5-5.5Z" fill="url(#i3ds-accent)"/>
<path d="M41 33c5.5 3 8.5 8.5 8.5 15L41 42.5Z" fill="url(#i3ds-accent)"/>
<path d="M32 7c6.5 4.5 9.5 12.5 9.5 20.5V41a4 4 0 0 1-4 4h-11a4 4 0 0 1-4-4V27.5C22.5 19.5 25.5 11.5 32 7Z" fill="url(#i3ds-body)"/>
<circle cx="32" cy="26" r="5.5" fill="url(#i3ds-accent)"/>
<ellipse cx="27.5" cy="21" rx="2.4" ry="6" transform="rotate(14 27.5 21)" fill="url(#i3ds-gloss)"/>
</svg>
<span>Rocket</span>
</div>
<!-- 11 more icons in the same language: chart, shield, cloud, message,
gear, lock, camera, battery, search, folder, star -->
</div>
</div>
<style>
.i3ds { --i3ds-c1: #c7b8ff; --i3ds-c2: #6c4cf1; --i3ds-c3: #8df0ff; --i3ds-c4: #0ea5e9; }
.i3ds[data-theme='amber'] { --i3ds-c1: #ffe9a8; --i3ds-c2: #f59e0b; }
.i3ds[data-theme='mint'] { --i3ds-c1: #b7f5dc; --i3ds-c2: #10b981; }
.i3ds .i3ds-s1 { stop-color: var(--i3ds-c1); }
.i3ds .i3ds-s2 { stop-color: var(--i3ds-c2); }
.i3ds .i3ds-sh { fill: url(#i3ds-shadow); }
.i3ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: .75rem; }
.i3ds-cell { display: grid; justify-items: center; padding: 1rem .5rem; border-radius: 1rem;
transform: perspective(38rem) rotateX(var(--i3ds-rx, 0deg)) rotateY(var(--i3ds-ry, 0deg));
transition: transform .18s ease; }
.i3ds-cell:hover { translate: 0 -2px; }
@media (prefers-reduced-motion: reduce) { .i3ds-cell { transform: none !important; } }
</style>
// app/Pages/IconLibrary.jsx — Inertia (React) page; renders the React
// snippet below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import IconGrid from '@/components/IconGrid';
export default function IconLibrary() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<IconGrid />
</main>
</NabuXUIProvider>
);
}
// IconGrid.jsx — the 3D icon set: shared gradient defs, pointer tilt,
// a segment that recolours every icon at once. No external assets.
import { useState } from 'react';
import '@nabuxai/ui-core/css';
const THEMES = {
violet: { c1: '#c7b8ff', c2: '#6c4cf1', c3: '#8df0ff', c4: '#0ea5e9' },
amber: { c1: '#ffe9a8', c2: '#f59e0b', c3: '#c9f2ff', c4: '#38bdf8' },
mint: { c1: '#b7f5dc', c2: '#10b981', c3: '#e3e0ff', c4: '#8b5cf6' },
};
const ICONS = [
{
id: 'rocket', label: 'Rocket',
art: (<>
<ellipse fill="url(#ic3-shadow)" cx="32" cy="55" rx="15" ry="4.5" />
<path fill="url(#ic3-accent)" d="M27.5 45h9c.3 3.5-1.7 6.5-4.5 9.5-2.8-3-4.8-6-4.5-9.5Z" />
<path fill="url(#ic3-accent)" d="M23 33c-5.5 3-8.5 8.5-8.5 15l8.5-5.5Z" />
<path fill="url(#ic3-accent)" d="M41 33c5.5 3 8.5 8.5 8.5 15L41 42.5Z" />
<path fill="url(#ic3-body)" d="M32 7c6.5 4.5 9.5 12.5 9.5 20.5V41a4 4 0 0 1-4 4h-11a4 4 0 0 1-4-4V27.5C22.5 19.5 25.5 11.5 32 7Z" />
<circle fill="url(#ic3-accent)" cx="32" cy="26" r="5.5" />
</>),
},
{
id: 'chart', label: 'Chart',
art: (<>
<ellipse fill="url(#ic3-shadow)" cx="34" cy="55" rx="17" ry="4" />
<polygon fill="url(#ic3-deep)" points="23,38 27,34 27,48 23,52" />
<polygon fill="url(#ic3-accent)" points="13,38 17,34 27,34 23,38" />
<rect fill="url(#ic3-body)" x="13" y="38" width="10" height="14" rx="2" />
<polygon fill="url(#ic3-deep)" points="37,28 41,24 41,48 37,52" />
<polygon fill="url(#ic3-accent)" points="27,28 31,24 41,24 37,28" />
<rect fill="url(#ic3-body)" x="27" y="28" width="10" height="24" rx="2" />
<polygon fill="url(#ic3-deep)" points="51,18 55,14 55,48 51,52" />
<polygon fill="url(#ic3-accent)" points="41,18 45,14 55,14 51,18" />
<rect fill="url(#ic3-body)" x="41" y="18" width="10" height="34" rx="2" />
</>),
},
{
id: 'shield', label: 'Shield',
art: (<>
<ellipse fill="url(#ic3-shadow)" cx="32" cy="54" rx="16" ry="4" />
<path fill="url(#ic3-body)" d="M32 8l18 6.5V29c0 11.5-7.4 19.9-18 25.2C23.4 48.9 14 40.5 14 29V14.5Z" />
<path fill="none" stroke="#fff" strokeOpacity=".55" strokeWidth="4.5" strokeLinecap="round" strokeLinejoin="round" d="M25 29l5.2 5.2L40 24" />
</>),
},
// …9 more icons in the same language, same shared gradients.
];
export default function IconGrid() {
const [theme, setTheme] = useState('violet');
const t = THEMES[theme];
// The tilt rides CSS custom properties — React never re-renders on pointermove.
const tilt = (e) => {
const el = e.currentTarget;
const r = el.getBoundingClientRect();
el.style.setProperty('--ic3-rx', `${(0.5 - (e.clientY - r.top) / r.height) * 12}deg`);
el.style.setProperty('--ic3-ry', `${((e.clientX - r.left) / r.width - 0.5) * 14}deg`);
};
const untilt = (e) => {
e.currentTarget.style.removeProperty('--ic3-rx');
e.currentTarget.style.removeProperty('--ic3-ry');
};
return (
<>
<style>{`
.ic3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: .75rem;
max-inline-size: 46rem; }
.ic3-cell { display: grid; justify-items: center; gap: .5rem; padding: 1rem .5rem; border-radius: 1rem;
background: color-mix(in oklab, ${t.c1} 14%, transparent);
transform: perspective(38rem) rotateX(var(--ic3-rx, 0deg)) rotateY(var(--ic3-ry, 0deg));
transition: transform .18s ease, background-color .18s ease; }
.ic3-cell:hover { background: color-mix(in oklab, ${t.c1} 26%, transparent); }
.ic3-cell svg { inline-size: 4rem; transition: translate .18s ease; }
.ic3-cell:hover svg { translate: 0 -4px; }
.ic3-seg { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; margin-block-end: 1rem; }
.ic3-seg button { border: none; border-radius: 999px; padding: .4rem 1rem; cursor: pointer; }
.ic3-seg button[aria-checked='true'] { background: linear-gradient(135deg, ${t.c1}, ${t.c2}); color: #fff; }
@media (prefers-reduced-motion: reduce) { .ic3-cell, .ic3-cell svg { transition: none; transform: none; translate: none; } }
`}</style>
{/* One hidden defs block colours every icon; the segment just swaps the stops. */}
<svg width="0" height="0" aria-hidden="true"><defs>
<linearGradient id="ic3-body" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stopColor={t.c1} /><stop offset="1" stopColor={t.c2} />
</linearGradient>
<linearGradient id="ic3-accent" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stopColor={t.c3} /><stop offset="1" stopColor={t.c4} />
</linearGradient>
<linearGradient id="ic3-gloss" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stopColor="#fff" stopOpacity=".85" /><stop offset="1" stopColor="#fff" stopOpacity="0" />
</linearGradient>
<radialGradient id="ic3-shadow">
<stop offset="0" stopColor="#0f172a" stopOpacity=".26" />
<stop offset="1" stopColor="#0f172a" stopOpacity="0" />
</radialGradient>
</defs></svg>
<div className="ic3-seg" role="radiogroup" aria-label="Colour theme">
{Object.keys(THEMES).map((k) => (
<button type="button" key={k} role="radio" aria-checked={theme === k} onClick={() => setTheme(k)}>{k}</button>
))}
</div>
<div className="ic3-grid">
{ICONS.map((i) => (
<div className="ic3-cell" key={i.id} onPointerMove={tilt} onPointerLeave={untilt}>
<svg viewBox="0 0 64 64" role="img" aria-label={i.label}>{i.art}</svg>
<span>{i.label}</span>
</div>
))}
</div>
</>
);
}
<!-- IconGrid.vue — the 3D icon set: shared gradient defs, pointer tilt, themed segment -->
<script setup lang="ts">
import { computed, ref } from 'vue';
import '@nabuxai/ui-core/css';
const themes = {
violet: { c1: '#c7b8ff', c2: '#6c4cf1', c3: '#8df0ff', c4: '#0ea5e9' },
amber: { c1: '#ffe9a8', c2: '#f59e0b', c3: '#c9f2ff', c4: '#38bdf8' },
mint: { c1: '#b7f5dc', c2: '#10b981', c3: '#e3e0ff', c4: '#8b5cf6' },
};
const icons = [
{
id: 'rocket', label: 'Rocket',
art: `<ellipse fill="url(#ic3-shadow)" cx="32" cy="55" rx="15" ry="4.5"/>
<path fill="url(#ic3-accent)" d="M27.5 45h9c.3 3.5-1.7 6.5-4.5 9.5-2.8-3-4.8-6-4.5-9.5Z"/>
<path fill="url(#ic3-accent)" d="M23 33c-5.5 3-8.5 8.5-8.5 15l8.5-5.5Z"/>
<path fill="url(#ic3-accent)" d="M41 33c5.5 3 8.5 8.5 8.5 15L41 42.5Z"/>
<path fill="url(#ic3-body)" d="M32 7c6.5 4.5 9.5 12.5 9.5 20.5V41a4 4 0 0 1-4 4h-11a4 4 0 0 1-4-4V27.5C22.5 19.5 25.5 11.5 32 7Z"/>
<circle fill="url(#ic3-accent)" cx="32" cy="26" r="5.5"/>`,
},
{
id: 'shield', label: 'Shield',
art: `<ellipse fill="url(#ic3-shadow)" cx="32" cy="54" rx="16" ry="4"/>
<path fill="url(#ic3-body)" d="M32 8l18 6.5V29c0 11.5-7.4 19.9-18 25.2C23.4 48.9 14 40.5 14 29V14.5Z"/>
<path fill="none" stroke="#fff" stroke-opacity=".55" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round" d="M25 29l5.2 5.2L40 24"/>`,
},
// …10 more icons in the same language, same shared gradients.
];
const theme = ref<'violet' | 'amber' | 'mint'>('violet');
const t = computed(() => themes[theme.value]);
// The tilt rides CSS custom properties — no re-render per pointermove.
function tilt(e: PointerEvent) {
const el = e.currentTarget as HTMLElement;
const r = el.getBoundingClientRect();
el.style.setProperty('--ic3-rx', `${(0.5 - (e.clientY - r.top) / r.height) * 12}deg`);
el.style.setProperty('--ic3-ry', `${((e.clientX - r.left) / r.width - 0.5) * 14}deg`);
}
function untilt(e: PointerEvent) {
(e.currentTarget as HTMLElement).style.removeProperty('--ic3-rx');
(e.currentTarget as HTMLElement).style.removeProperty('--ic3-ry');
}
</script>
<template>
<!-- One hidden defs block colours every icon; the segment just swaps the stops. -->
<svg width="0" height="0" aria-hidden="true"><defs>
<linearGradient id="ic3-body" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" :stop-color="t.c1" /><stop offset="1" :stop-color="t.c2" />
</linearGradient>
<linearGradient id="ic3-accent" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" :stop-color="t.c3" /><stop offset="1" :stop-color="t.c4" />
</linearGradient>
<radialGradient id="ic3-shadow">
<stop offset="0" stop-color="#0f172a" stop-opacity=".26" />
<stop offset="1" stop-color="#0f172a" stop-opacity="0" />
</radialGradient>
</defs></svg>
<div class="ic3-seg" role="radiogroup" aria-label="Colour theme">
<button v-for="(c, k) in themes" :key="k" type="button" role="radio"
:aria-checked="theme === k" @click="theme = k as any">{{ k }}</button>
</div>
<div class="ic3-grid">
<div v-for="i in icons" :key="i.id" class="ic3-cell" @pointermove="tilt" @pointerleave="untilt">
<svg viewBox="0 0 64 64" role="img" :aria-label="i.label" v-html="i.art" />
<span>{{ i.label }}</span>
</div>
</div>
</template>
<style scoped>
.ic3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: .75rem;
max-inline-size: 46rem; }
.ic3-cell { display: grid; justify-items: center; gap: .5rem; padding: 1rem .5rem; border-radius: 1rem;
background: color-mix(in oklab, v-bind('t.c1') 14%, transparent);
transform: perspective(38rem) rotateX(var(--ic3-rx, 0deg)) rotateY(var(--ic3-ry, 0deg));
transition: transform .18s ease, background-color .18s ease; }
.ic3-cell:hover { background: color-mix(in oklab, v-bind('t.c1') 26%, transparent); }
.ic3-cell svg { inline-size: 4rem; transition: translate .18s ease; }
.ic3-cell:hover svg { translate: 0 -4px; }
.ic3-seg { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; margin-block-end: 1rem; }
.ic3-seg button { border: none; border-radius: 999px; padding: .4rem 1rem; cursor: pointer; }
.ic3-seg button[aria-checked='true'] { background: linear-gradient(135deg, v-bind('t.c1'), v-bind('t.c2')); color: #fff; }
@media (prefers-reduced-motion: reduce) { :deep(.ic3-cell), .ic3-cell svg { transition: none; transform: none; translate: none; } }
</style>
<!-- IconGrid.svelte — the 3D icon set: shared gradient defs, pointer tilt, themed segment -->
<script lang="ts">
import '@nabuxai/ui-core/css';
const themes = {
violet: { c1: '#c7b8ff', c2: '#6c4cf1', c3: '#8df0ff', c4: '#0ea5e9' },
amber: { c1: '#ffe9a8', c2: '#f59e0b', c3: '#c9f2ff', c4: '#38bdf8' },
mint: { c1: '#b7f5dc', c2: '#10b981', c3: '#e3e0ff', c4: '#8b5cf6' },
};
const icons = [
{
id: 'rocket', label: 'Rocket',
art: `<ellipse fill="url(#ic3-shadow)" cx="32" cy="55" rx="15" ry="4.5"/>
<path fill="url(#ic3-accent)" d="M27.5 45h9c.3 3.5-1.7 6.5-4.5 9.5-2.8-3-4.8-6-4.5-9.5Z"/>
<path fill="url(#ic3-accent)" d="M23 33c-5.5 3-8.5 8.5-8.5 15l8.5-5.5Z"/>
<path fill="url(#ic3-accent)" d="M41 33c5.5 3 8.5 8.5 8.5 15L41 42.5Z"/>
<path fill="url(#ic3-body)" d="M32 7c6.5 4.5 9.5 12.5 9.5 20.5V41a4 4 0 0 1-4 4h-11a4 4 0 0 1-4-4V27.5C22.5 19.5 25.5 11.5 32 7Z"/>
<circle fill="url(#ic3-accent)" cx="32" cy="26" r="5.5"/>`,
},
{
id: 'shield', label: 'Shield',
art: `<ellipse fill="url(#ic3-shadow)" cx="32" cy="54" rx="16" ry="4"/>
<path fill="url(#ic3-body)" d="M32 8l18 6.5V29c0 11.5-7.4 19.9-18 25.2C23.4 48.9 14 40.5 14 29V14.5Z"/>
<path fill="none" stroke="#fff" stroke-opacity=".55" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round" d="M25 29l5.2 5.2L40 24"/>`,
},
// …10 more icons in the same language, same shared gradients.
];
let theme = $state<'violet' | 'amber' | 'mint'>('violet');
const t = $derived(themes[theme]);
// The tilt rides CSS custom properties — no re-render per pointermove.
function tilt(e: PointerEvent) {
const el = e.currentTarget as HTMLElement;
const r = el.getBoundingClientRect();
el.style.setProperty('--ic3-rx', `${(0.5 - (e.clientY - r.top) / r.height) * 12}deg`);
el.style.setProperty('--ic3-ry', `${((e.clientX - r.left) / r.width - 0.5) * 14}deg`);
}
function untilt(e: PointerEvent) {
(e.currentTarget as HTMLElement).style.removeProperty('--ic3-rx');
(e.currentTarget as HTMLElement).style.removeProperty('--ic3-ry');
}
</script>
<!-- One hidden defs block colours every icon; the segment just swaps the stops. -->
<svg width="0" height="0" aria-hidden="true"><defs>
<linearGradient id="ic3-body" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color={t.c1} /><stop offset="1" stop-color={t.c2} />
</linearGradient>
<linearGradient id="ic3-accent" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color={t.c3} /><stop offset="1" stop-color={t.c4} />
</linearGradient>
<radialGradient id="ic3-shadow">
<stop offset="0" stop-color="#0f172a" stop-opacity=".26" />
<stop offset="1" stop-color="#0f172a" stop-opacity="0" />
</radialGradient>
</defs></svg>
<div class="ic3-seg" role="radiogroup" aria-label="Colour theme">
{#each Object.entries(themes) as [k] (k)}
<button type="button" role="radio" aria-checked={theme === k} onclick={() => (theme = k as any)}>{k}</button>
{/each}
</div>
<div class="ic3-grid">
{#each icons as i (i.id)}
<div class="ic3-cell" onpointermove={tilt} onpointerleave={untilt}>
<svg viewBox="0 0 64 64" role="img" aria-label={i.label}>{@html i.art}</svg>
<span>{i.label}</span>
</div>
{/each}
</div>
<style>
.ic3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: .75rem;
max-inline-size: 46rem; }
.ic3-cell { display: grid; justify-items: center; gap: .5rem; padding: 1rem .5rem; border-radius: 1rem;
background: color-mix(in oklab, v-bind(t.c1) 14%, transparent);
transform: perspective(38rem) rotateX(var(--ic3-rx, 0deg)) rotateY(var(--ic3-ry, 0deg));
transition: transform .18s ease, background-color .18s ease; }
.ic3-cell:hover { background: color-mix(in oklab, v-bind(t.c1) 26%, transparent); }
.ic3-cell svg { inline-size: 4rem; transition: translate .18s ease; }
.ic3-cell:hover svg { translate: 0 -4px; }
.ic3-seg { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; margin-block-end: 1rem; }
.ic3-seg button { border: none; border-radius: 999px; padding: .4rem 1rem; cursor: pointer; }
.ic3-seg button[aria-checked='true'] { background: linear-gradient(135deg, v-bind(t.c1), v-bind(t.c2)); color: #fff; }
@media (prefers-reduced-motion: reduce) { .ic3-cell, .ic3-cell svg { transition: none; transform: none; translate: none; } }
</style>