Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f9b0272
style: initial darkmode setup
printerscanner Jan 21, 2026
1c09210
style: fix darkmode styles
printerscanner Jan 22, 2026
7bcb0d6
Merge branch 'staging-next' of https://github.com/xyflow/web into dar…
printerscanner Jan 26, 2026
a8bedf9
chore: fix merge error
printerscanner Jan 26, 2026
62b507e
style: implement dark mode
printerscanner Jan 27, 2026
ff11510
chore: remove style override in html client
printerscanner Jan 27, 2026
01767c5
style: fix index flow
printerscanner Jan 27, 2026
1d84d08
style: fix hero flow bg gradient
printerscanner Jan 27, 2026
22bf297
style: fix hero flow
printerscanner Jan 27, 2026
c388cba
style: fix logo styling
printerscanner Jan 28, 2026
e210ba4
style: add muted dark mode color
printerscanner Jan 28, 2026
306243a
style: remove no underline
printerscanner Jan 28, 2026
70f5380
Merge branch 'staging-next' of https://github.com/xyflow/web into dar…
printerscanner Jan 28, 2026
23c39ce
Merge branch 'staging-next' of https://github.com/xyflow/web into dar…
printerscanner Feb 2, 2026
102f671
style: swap bg-white with bg-background
printerscanner Feb 2, 2026
aa7a191
style: update background gradients
printerscanner Feb 12, 2026
1f10959
style: fix DocSearch dark mode
printerscanner Feb 12, 2026
890fc48
style: fix border colors
printerscanner Feb 16, 2026
4111681
chore: fix client logos for dark mode
printerscanner Feb 16, 2026
2b63561
style: add the rest of the dark mode styles, fix border colors
printerscanner Feb 16, 2026
cc16d44
style: swap bg-gray-100 for theme color
printerscanner Feb 16, 2026
56d771c
style: fix base text
printerscanner Feb 16, 2026
0cc665d
style: remove content grid borders
printerscanner Feb 16, 2026
76a671e
chore: fix pro-button dark mode
printerscanner Feb 18, 2026
0e0a449
style: fix flow text color
printerscanner Feb 18, 2026
0ab4922
style: fix text base
printerscanner Feb 18, 2026
9592adf
style: update xyflow link dark mode
printerscanner Feb 18, 2026
69f7bf2
chore: fix link color
printerscanner Feb 18, 2026
8949799
style: fix gradient for dark mode
printerscanner Feb 18, 2026
de1f605
chore: fix wide images, secondary card colors
printerscanner Feb 18, 2026
8fe9abf
chore: set dark mode on xyflow and svelte flow, fix developer survey …
printerscanner Feb 18, 2026
80ee858
chore: fix content grid hover svelte
printerscanner Feb 18, 2026
f0aec4c
Merge branch 'staging-next' into dark-mode
printerscanner Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions apps/example-apps/react/examples/styling/tailwind/CustomNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function CustomNode({ data }) {
return (
<div className="px-4 py-2 shadow-md rounded-md bg-white border-2 border-stone-400">
<div className="flex">
<div className="rounded-full w-12 h-12 flex justify-center items-center bg-gray-100">
<div className="rounded-full w-12 h-12 flex justify-center items-center bg-card">
{data.emoji}
</div>
<div className="ml-2">
Expand All @@ -14,16 +14,8 @@ function CustomNode({ data }) {
</div>
</div>

<Handle
type="target"
position={Position.Top}
className="w-16 !bg-teal-500"
/>
<Handle
type="source"
position={Position.Bottom}
className="w-16 !bg-teal-500"
/>
<Handle type="target" position={Position.Top} className="w-16 !bg-teal-500" />
<Handle type="source" position={Position.Bottom} className="w-16 !bg-teal-500" />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function NumNode({ id, data }: NodeProps<NumNode>) {
</div>
</BaseNodeContent>

<BaseNodeFooter className="bg-gray-100 items-end px-0 py-1 w-full rounded-b-md">
<BaseNodeFooter className="bg-card items-end px-0 py-1 w-full rounded-b-md">
<LabeledHandle title="out" type="source" position={Position.Right} />
</BaseNodeFooter>
</BaseNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function SumNode({ id }: NodeProps<SumNode>) {
<LabeledHandle title="x" id="x" type="target" position={Position.Left} />
<LabeledHandle title="y" id="y" type="target" position={Position.Left} />
</BaseNodeContent>
<BaseNodeFooter className="bg-gray-100 items-end px-0 py-1 w-full rounded-b-md">
<BaseNodeFooter className="bg-card items-end px-0 py-1 w-full rounded-b-md">
<LabeledHandle title="out" type="source" position={Position.Right} />
</BaseNodeFooter>
</BaseNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ export default function Osc({ id, data }) {

return (
<div className={tw('rounded-md bg-white shadow-xl')}>
<p
className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}
>
Osc
</p>
<p className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}>Osc</p>

<label className={tw('flex flex-col px-2 py-1')}>
<p className={tw('text-xs font-bold mb-2')}>Frequency</p>
Expand All @@ -34,7 +30,7 @@ export default function Osc({ id, data }) {
<p className={tw('text-right text-xs')}>{data.frequency} Hz</p>
</label>

<hr className={tw('border-gray-200 mx-2')} />
<hr className={tw('border-border mx-2')} />

<label className={tw('flex flex-col px-2 pt-1 pb-4')}>
<p className={tw('text-xs font-bold mb-2')}>Waveform</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ export default function Osc({ id, data }) {

return (
<div className={tw('rounded-md bg-white shadow-xl')}>
<p
className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}
>
Osc
</p>
<p className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}>Osc</p>

<label className={tw('flex flex-col px-2 py-1')}>
<p className={tw('text-xs font-bold mb-2')}>Frequency</p>
Expand All @@ -34,7 +30,7 @@ export default function Osc({ id, data }) {
<p className={tw('text-right text-xs')}>{data.frequency} Hz</p>
</label>

<hr className={tw('border-gray-200 mx-2')} />
<hr className={tw('border-border mx-2')} />

<label className={tw('flex flex-col px-2 pt-1 pb-4')}>
<p className={tw('text-xs font-bold mb-2')}>Waveform</p>
Expand Down
8 changes: 2 additions & 6 deletions apps/example-apps/react/tutorials/webaudio/demo/nodes/Osc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ export default function Osc({ id, data }) {

return (
<div className={tw('rounded-md bg-white shadow-xl')}>
<p
className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}
>
Osc
</p>
<p className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}>Osc</p>

<label className={tw('flex flex-col px-2 py-1')}>
<p className={tw('text-xs font-bold mb-2')}>Frequency</p>
Expand All @@ -34,7 +30,7 @@ export default function Osc({ id, data }) {
<p className={tw('text-right text-xs')}>{data.frequency} Hz</p>
</label>

<hr className={tw('border-gray-200 mx-2')} />
<hr className={tw('border-border mx-2')} />

<label className={tw('flex flex-col px-2 pt-1 pb-4')}>
<p className={tw('text-xs font-bold mb-2')}>Waveform</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ export default function Osc({ id, data }) {

return (
<div className={tw('rounded-md bg-white shadow-xl')}>
<p
className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}
>
Osc
</p>
<p className={tw('rounded-t-md px-2 py-1 bg-pink-500 text-white text-sm')}>Osc</p>

<label className={tw('flex flex-col px-2 py-1')}>
<p className={tw('text-xs font-bold mb-2')}>Frequency</p>
Expand All @@ -34,7 +30,7 @@ export default function Osc({ id, data }) {
<p className={tw('text-right text-xs')}>{data.frequency} Hz</p>
</label>

<hr className={tw('border-gray-200 mx-2')} />
<hr className={tw('border-border mx-2')} />

<label className={tw('flex flex-col px-2 pt-1 pb-4')}>
<p className={tw('text-xs font-bold mb-2')}>Waveform</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
</script>

<div
class="flex flex-col border border-solid border-gray-200 h-full rounded-2xl bg-white/70 shadow-[0_7px_9px_0_rgba(0,0,0,0.02)]"
class="flex flex-col border border-solid border-border h-full rounded-2xl bg-white/70 shadow-[0_7px_9px_0_rgba(0,0,0,0.02)]"
>
<div
class="text-xs px-3 py-2 border-b border-solid border-gray-200 font-mono font-semibold rounded-t-2xl family-mono text-[#0F172A]"
class="text-xs px-3 py-2 border-b border-solid border-border font-mono font-semibold rounded-t-2xl family-mono text-[#0F172A]"
>
{label}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="px-4 py-2 shadow-md rounded-md bg-white border-2 border-stone-400">
<div class="flex">
<div
class="rounded-full w-12 h-12 flex justify-center items-center bg-gray-100"
class="rounded-full w-12 h-12 flex justify-center items-center bg-card"
>
{data.emoji}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/xy-shared/components/authors-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Author({ name, title, image, url, className, noLink, slim }: AuthorProp
<LinkOrSpan noLink={noLink} url={url} className="!w-10 !h-10 mr-2">
<img
src={image}
className="inline w-10 h-10 border border-gray-100 border-solid rounded-full"
className="inline w-10 h-10 border border-border border-solid rounded-full"
/>
</LinkOrSpan>
)}
Expand Down
33 changes: 30 additions & 3 deletions packages/xy-shared/components/blog-post/embeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,33 @@ import NxImage from 'next/image';
import { cn } from '../../lib/utils';

import { LiteYouTubeEmbed } from '../liteyoutube-embed';
import { wideNegativeMargin } from '../../lib/wide-negative-margin';

// Well this is a pretty funky class, huh. I'm gonna try and break it down a bit
// so we can understand what's going on here:
//
// sm:
// This is a tailwind breakpoint. It means the class will only apply on screens
// that are at least 640px wide.
//
// -mx
// This utility sets a *negative* margin, and its ultimately how we get our
// content to be wider than its container.
//
// calc((100vw-768px)/2)
// 768px is the max width of our content container. 100vh is the full width of
// the viewport. So this expression calculates how much space is left on the
// screen for us to fill. We divide it by two because we're applying this margin
// equally on both sides of the embed.
//
// min(...,12rem)
// As the display gets wider, we want to limit the width of our embeds to do
// something sensible so they don't end up spanning the entire width of someone's
// ultra-wide monitor. 12rem was chosen as an arbitrary sensible limit, it corresponds
// to tailwind's `mx-44` utility.
//
// Use the actual content width token if available, fall back to 768px.
const wideNegativeMargin =
'sm:-mx-[min(calc((100vw-var(--nextra-content-width,768px))/2),12rem)]';

// IMAGES ----------------------------------------------------------------------

Expand Down Expand Up @@ -69,14 +95,15 @@ export function Image({
export type EmbedProps = {
src: string;
lazy?: boolean;
wide?: boolean;
className?: string;
};

type IFrameProps = {
loading?: 'lazy' | 'eager';
};

export function Embed({ src, lazy, className }: EmbedProps) {
export function Embed({ src, lazy, wide = true, className }: EmbedProps) {
const iFrameProps: IFrameProps = {};

if (lazy) {
Expand All @@ -87,7 +114,7 @@ export function Embed({ src, lazy, className }: EmbedProps) {
<div
className={cn(
'relative aspect-video my-8 mx-0 rounded-xl bg-gray-50',
wideNegativeMargin,
wide && wideNegativeMargin,
className,
)}
>
Expand Down
5 changes: 4 additions & 1 deletion packages/xy-shared/components/client-logos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export default function ClientLogos({
key={logo.alt}
src={logo.src}
alt={logo.alt}
className={cn('w-auto', logo.className)}
className={cn(
'w-auto transition-[filter] dark:invert dark:brightness-0 dark:contrast-200',
logo.className,
)}
/>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/xy-shared/components/flows/flow-a/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const FlowA: FC = () => {
return (
<ReactFlow
id="a"
className="text-black"
defaultNodes={nodes}
defaultEdges={edges}
fitView
Expand All @@ -43,4 +44,3 @@ export const FlowA: FC = () => {
</ReactFlow>
);
};

2 changes: 1 addition & 1 deletion packages/xy-shared/components/flows/flow-b/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function Flow() {
return (
<ReactFlow
id="b"
className="bg-[#141414]"
className="bg-[#141414] text-black"
defaultNodes={nodes}
defaultEdges={edges}
nodeTypes={nodeTypes}
Expand Down
3 changes: 1 addition & 2 deletions packages/xy-shared/components/flows/flow-c/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const FlowC = () => {
return (
<ReactFlow
id="c"
className="home-flow-c"
className="home-flow-c text-black"
defaultNodes={nodes}
defaultEdges={edges}
fitView
Expand All @@ -151,4 +151,3 @@ export const FlowC = () => {
</ReactFlow>
);
};

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ type NodeWrapperProps = {

export default function NodeWrapper({ label, children }: NodeWrapperProps) {
return (
<div className="flex flex-col border border-solid border-gray-200 h-full rounded-2xl bg-white/70 shadow-[0_7px_9px_0_rgba(0,0,0,0.02)]">
<div className="text-xs px-3 py-2 border-b border-solid border-gray-200 font-mono font-semibold rounded-t-2xl">
<div className="flex flex-col border border-solid border-border h-full rounded-2xl bg-background/70 shadow-[0_7px_9px_0_rgba(0,0,0,0.02)]">
<div className="text-xs px-3 py-2 border-b border-solid border-border font-mono font-semibold rounded-t-2xl">
{label}
</div>
<div className="relative bg-white p-3 flex rounded-b-2xl">{children}</div>
<div className="relative bg-background p-3 flex rounded-b-2xl">{children}</div>
</div>
);
}
2 changes: 1 addition & 1 deletion packages/xy-shared/components/handle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Handle({
data-position={position}
data-to={to}
className={cn(
'absolute rounded-full border-2 border-solid bg-white z-20 border-primary',
'absolute rounded-full border-2 border-solid bg-background z-20 border-primary',
handleWidthClass,
handleHeightClass,
handleClassName,
Expand Down
2 changes: 1 addition & 1 deletion packages/xy-shared/components/headline-node/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type HeadlineNodeProps = {
function HeadlineNode({ children, className, style }: HeadlineNodeProps) {
return (
<span
className={cn(['relative shadow-lg py-2 rounded-xl bg-white', className])}
className={cn(['relative shadow-lg py-2 rounded-xl bg-background', className])}
style={style}
>
<span
Expand Down
4 changes: 2 additions & 2 deletions packages/xy-shared/components/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export function Hero({
<div ref={ref}>
{backgroundVariant === 'gradient' && (
<div
className="absolute -mt-16 opacity-10 w-[100vw] h-[70vw] left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none"
className="absolute -mt-16 opacity-10 dark:opacity-20 w-[100vw] h-[70vw] left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none"
style={{
background:
'radial-gradient(rgba(68,91,222,1) 0%, rgba(215,78,243,1) 25%, rgba(255,255,255,1) 50%)',
'radial-gradient(rgba(68,91,222,1) 0%, rgba(215,78,243,1) 25%, hsl(var(--background)) 60%)',
}}
/>
)}
Expand Down
7 changes: 1 addition & 6 deletions packages/xy-shared/components/html/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
'use client';

import { FC, ReactNode } from 'react';
import { usePathname } from 'next/navigation';
import { ntDapperFont } from '../../fonts/index';
import { cn } from '../../lib/utils';

export const Html: FC<{ children: ReactNode }> = ({ children }) => {
const pathname = usePathname();
// we need this to be able to override nextra theme styles for specific pages
const routeSegment = pathname.split('/', 2)[1];

return (
<html
className={cn(ntDapperFont.className, routeSegment)}
className={cn(ntDapperFont.className)}
dir="ltr"
lang="en"
suppressHydrationWarning
Expand Down
3 changes: 1 addition & 2 deletions packages/xy-shared/components/menubar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function MenubarItem({
data-inset={inset}
data-variant={variant}
className={cn(
"focus:bg-gray-100 focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
"focus:bg-card focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className,
)}
{...props}
Expand Down Expand Up @@ -257,4 +257,3 @@ export {
MenubarSubTrigger,
MenubarSubContent,
};

6 changes: 3 additions & 3 deletions packages/xy-shared/components/pricing-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ const PricingTable = ({
className,
)}
>
<div className="rounded-full flex gap-1 bg-gray-100 p-2 ">
<div className="rounded-full flex gap-1 bg-card p-2 ">
<Button
variant="secondary"
onClick={() => setBillingInterval(BillingInterval.MONTH)}
className={isMonthly ? '' : 'text-gray-400 bg-gray-100 shadow-none'}
className={isMonthly ? '' : 'text-gray-400 bg-card shadow-none'}
>
Monthly
</Button>
<Button
variant="secondary"
onClick={() => setBillingInterval(BillingInterval.YEAR)}
className={!isMonthly ? '' : 'text-gray-400 bg-gray-100 shadow-none'}
className={!isMonthly ? '' : 'text-gray-400 bg-card shadow-none'}
>
Yearly
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function Plan({
className={cn(
'p-8 md:p-12 lg:p-14',
highlighted &&
'border-x border-solid border-gray-100 bg-gradient-to-b from-primary/5',
'border-x border-solid border-border bg-gradient-to-b from-primary/5',
)}
>
<div className={cn('font-bold text-4xl', highlighted && 'text-primary')}>
Expand Down
3 changes: 1 addition & 2 deletions packages/xy-shared/components/pro-example-viewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,12 @@ const ProExampleViewer: FC<{
: queryParams;

const src = appendSearchParams(iframeBaseSrc, toSearchParams(perIframeParams));

return (
<iframe
key={index}
src={src}
title={`${slug} preview ${index}`}
className={cn('block h-[645px] bg-white', sideBySide ? 'w-1/2' : 'w-full')}
className={cn('block h-[645px] bg-background', sideBySide ? 'w-1/2' : 'w-full')}
/>
);
})}
Expand Down
Loading