Canvix — Free & open-source graphic design tool. A community-built Canva alternative with a drag-and-drop editor, templates, shapes, text, images & one-click export. Works on desktop, tablet & mobile.
TypeScript canva-alternativecanvasdesigndesign-tooldrag-and-dropeditorgraphic-designkonvanextjsopen-sourcereactself-hostedtemplatestypescript
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}
/* ── Canvix brand utilities ─────────────────────────────────── */
:root {
/* core brand */
--cv-teal: #02c0cc;
--cv-violet: #7630d7; /* CTA purple — real rgb(118,48,215) from canva.com */
--cv-violet-hover: #8b5cf6;
--cv-violet-press: #6529c0;
--cv-magenta: #ff5c8a;
/* dark chrome */
--cv-app: #1f142e; /* home app bg — real rgb(31,20,46) */
--cv-rail: #1c1229; /* home left rail */
--cv-rail-editor: #1d1f26; /* editor left rail */
--cv-rail-active: #2a2c35;
--cv-surface: #16171d; /* cards / chips / icon buttons — real rgb(22,23,29) */
--cv-surface-2: #232530;
--cv-panel: #16181d; /* editor side panel */
--cv-panel-header: #101218;
--cv-workspace: #0f1015; /* editor canvas workspace */
--cv-ink: #0f1015;
/* text */
--cv-text: rgba(255, 255, 255, 0.9);
--cv-text-2: rgba(255, 255, 255, 0.7);
--cv-text-3: rgba(255, 255, 255, 0.55);
--cv-border: rgba(255, 255, 255, 0.09);
/* v0.3 interaction tokens — measured on canva.com 2026-09-03 */
--cv-selection: #7630d7; /* element selection border — real rgb(118,48,215) */
--cv-guide: #9954ff; /* alignment guide lines — real rgb(153,84,255) */
--cv-menu: #121319; /* context menu / dropdown surface */
--cv-menu-item: #1a1b22; /* menu item hover */
--cv-slider-fill: #7630d7; /* popover slider fill */
/* gradients */
--cv-grad-bar: linear-gradient(95deg, #0aa8c8 0%, #5b2bd9 26%, #7c3aed 54%, #a855f7 80%, #c86bd9 100%);
--cv-grad-brand: linear-gradient(120deg, #02c0cc 0%, #7630d7 55%, #ff5c8a 100%);
}
/* ── v0.3 shared component classes ─────────────────────────── */
/* canva-style context menu (244px, items 32px, 13px, r10) */
.cv-menu {
position: fixed;
z-index: 80;
min-width: 224px;
max-width: 244px;
background: var(--cv-menu);
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: 10px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
padding: 4px;
animation: cv-pop-in 0.12s ease-out;
}
.cv-menu-item {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
height: 32px;
padding: 0 10px;
border-radius: 6px;
color: var(--cv-text);
font-size: 13px;
font-weight: 500;
text-align: left;
transition: background 0.1s ease;
}
.cv-menu-item:hover, .cv-menu-item:focus-visible {
background: rgba(255, 255, 255, 0.08);
outline: none;
}
.cv-menu-item .cv-menu-kbd {
margin-left: auto;
font-size: 11px;
color: var(--cv-text-3);
font-family: var(--font-geist-mono), monospace;
}
.cv-menu-sep {
height: 1px;
background: rgba(255, 255, 255, 0.08);
margin: 4px 8px;
}
.cv-menu-item-danger { color: #ff8080; }
.cv-menu-item-danger:hover { background: rgba(255, 90, 90, 0.12); }
/* 32px contextual toolbar button (canva r10) */
.cv-tbtn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 32px;
min-width: 32px;
padding: 0 6px;
border-radius: 10px;
color: var(--cv-text);
font-size: 14px;
font-weight: 600;
transition: background 0.12s ease, color 0.12s ease;
flex-shrink: 0;
}
.cv-tbtn:hover { background: rgba(255, 255, 255, 0.1); }
.cv-tbtn:active { background: rgba(255, 255, 255, 0.16); }
.cv-tbtn[data-active="true"] { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cv-tbtn[data-dim="true"] { color: var(--cv-text-3); }
.cv-tbtn:disabled { opacity: 0.4; pointer-events: none; }
/* popover panels (spacing / transparency / position) */
.cv-pop {
position: absolute;
z-index: 60;
background: #1e1f26;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 14px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
padding: 14px;
min-width: 232px;
animation: cv-pop-in 0.14s ease-out;
}
/* canva-style slider: purple fill + white circular handle */
.cv-slider {
-webkit-appearance: none;
appearance: none;
height: 4px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.14);
outline: none;
cursor: pointer;
}
.cv-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
cursor: grab;
border: none;
}
.cv-slider::-moz-range-thumb {
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
border: none;
cursor: grab;
}
/* tooltip (canva: ~45×28, delayed, dark) */
.cv-tip {
position: fixed;
z-index: 90;
background: #0f1015;
color: #fff;
font-size: 12px;
font-weight: 500;
padding: 4px 8px;
border-radius: 6px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
pointer-events: none;
white-space: nowrap;
animation: cv-pop-in 0.1s ease-out;
}
/* circular swatch (canva color menu) */
.cv-swatch {
border-radius: 50%;
border: 2px solid transparent;
transition: transform 0.12s ease, border-color 0.12s ease;
cursor: pointer;
}
.cv-swatch:hover { transform: scale(1.12); border-color: rgba(255, 255, 255, 0.4); }
.cv-swatch[data-selected="true"] { border-color: #fff; transform: scale(1.08); }
@keyframes cv-pop-in {
from { opacity: 0; transform: translateY(4px) scale(0.98); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
/* skeleton shimmer (canva loading state) */
.cv-skeleton {
position: relative;
overflow: hidden;
background: rgba(255, 255, 255, 0.06);
border-radius: 10px;
}
.cv-skeleton::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
animation: cv-shimmer 1.4s infinite;
}
@keyframes cv-shimmer {
from { transform: translateX(-100%); }
to { transform: translateX(100%); }
}
/* toast (canva-style bottom center) */
.cv-toast {
position: fixed;
left: 50%;
bottom: 24px;
transform: translateX(-50%);
z-index: 95;
background: #26272f;
color: #fff;
font-size: 13px;
font-weight: 500;
padding: 10px 16px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
gap: 8px;
animation: cv-toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cv-toast-in {
from { opacity: 0; transform: translateX(-50%) translateY(12px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* focus-visible ring for a11y (subtle canva-style) */
:where(button, a, input, select, [tabindex]):focus-visible {
outline: 2px solid rgba(118, 48, 215, 0.85);
outline-offset: 2px;
}
.font-sans {
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
}
.bg-brand-gradient {
background: var(--cv-grad-bar);
}
.bg-brand-gradient-soft {
background: linear-gradient(120deg, rgba(2, 192, 204, 0.14), rgba(118, 48, 215, 0.14), rgba(255, 92, 138, 0.14));
}
.text-brand-gradient {
background: var(--cv-grad-brand);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
/* editor topbar — the signature canva cyan→purple gradient */
.cv-topbar-gradient {
background: var(--cv-grad-bar);
}
/* primary purple button — canva real CTA style: 14px/600, radius 12 */
.btn-cv {
background: var(--cv-violet);
color: #fff;
border-radius: 12px;
font-weight: 600;
transition: background 0.15s ease, transform 0.1s ease;
}
.btn-cv:hover {
background: var(--cv-violet-hover);
}
.btn-cv:active {
background: var(--cv-violet-press);
transform: translateY(1px);
}
/* white pill button (canva "Share") */
.btn-cv-white {
background: rgba(255, 255, 255, 0.92);
color: var(--cv-ink);
border-radius: 12px;
font-weight: 600;
transition: background 0.15s ease;
}
.btn-cv-white:hover {
background: #ffffff;
}
/* ghost button for dark chrome */
.btn-cv-ghost {
color: var(--cv-text);
border-radius: 12px;
}
.btn-cv-ghost:hover {
background: rgba(255, 255, 255, 0.1);
color: #fff;
}
.btn-brand-gradient {
background: linear-gradient(120deg, #02c0cc 0%, #7630d7 100%);
color: #fff;
transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-brand-gradient:hover {
filter: brightness(1.08);
}
.btn-brand-gradient:active {
transform: translateY(1px);
}
/* thin scrollbars (dark chrome everywhere now) */
.cv-scroll {
scrollbar-width: thin;
scrollbar-color: #3a3b45 transparent;
}
.cv-scroll::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.cv-scroll::-webkit-scrollbar-thumb {
background: #3a3b45;
border-radius: 999px;
}
.cv-scroll::-webkit-scrollbar-thumb:hover {
background: #4a4b58;
}
.cv-scroll-dark {
scrollbar-width: thin;
scrollbar-color: #3a3b45 transparent;
}
.cv-scroll-dark::-webkit-scrollbar {
width: 8px;
}
.cv-scroll-dark::-webkit-scrollbar-thumb {
background: #3a3b45;
border-radius: 999px;
}
/* v0.11.3: single-row swipeable strips (Elements category tabs, Photos/Templates
filter chips) — scroll instead of wrap. No visible scrollbar (a cut-off label
is the affordance), and no horizontal scroll chaining to the page. */
.cv-tabscroll {
scrollbar-width: none;
overscroll-behavior-x: contain;
}
.cv-tabscroll::-webkit-scrollbar {
display: none;
}
/* landing animations */
@keyframes cv-fade-up {
from {
opacity: 0;
transform: translateY(18px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-up {
animation: cv-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.delay-100 {
animation-delay: 0.1s;
}
.delay-200 {
animation-delay: 0.2s;
}
.delay-300 {
animation-delay: 0.3s;
}
@keyframes cv-float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.animate-float {
animation: cv-float 6s ease-in-out infinite;
}
/* hide number input spinners (font size inputs) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield;
appearance: textfield;
}
/* Konva text editor overlay */
.cv-textarea-overlay {
position: absolute;
background: transparent;
border: none;
outline: 2px solid var(--cv-violet);
resize: none;
overflow: hidden;
white-space: pre-wrap;
transform-origin: top left;
z-index: 40;
padding: 0;
margin: 0;
}
/* dark surface helpers */
.cv-surface {
background: var(--cv-surface);
}
.cv-panel-bg {
background: var(--cv-panel);
}
/* ── v0.15 (R1): rich-text editing overlay ─────────────────── */
/* styled mirror behind the (transparent) textarea — same geometry,
same font metrics, pointer-transparent */
.cv-rich-mirror {
position: absolute;
pointer-events: none;
border: none;
background: transparent;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
overflow: hidden;
transform-origin: top left;
z-index: 39; /* under the textarea overlay (z-index 40) */
padding: 0;
margin: 0;
}
/* the floating selection toolbar (B / I / U / S / colour / link) */
.cv-rich-toolbar {
position: absolute;
z-index: 45;
display: flex;
align-items: center;
gap: 2px;
padding: 4px 6px;
background: var(--cv-surface, #1f2226);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 10px;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
transform-origin: top left;
}
.cv-rich-toolbar .cv-tbtn {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.cv-rich-color-input {
width: 18px;
height: 18px;
padding: 0;
border: none;
background: transparent;
cursor: pointer;
}
/* the link editor popover (opens off the Link button) */
.cv-rich-link-pop {
position: absolute;
top: 36px;
left: 0;
display: flex;
align-items: center;
gap: 4px;
padding: 6px;
background: var(--cv-surface, #1f2226);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 8px;
z-index: 46;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.cv-rich-link-pop input {
width: 200px;
height: 28px;
padding: 0 8px;
font-size: 12px;
color: #fff;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
outline: none;
}
.cv-rich-link-pop input:focus {
border-color: var(--cv-violet, #9954ff);
}