Skip to content

Theming

The FlyQL editor uses CSS custom properties (variables) for all visual styling. Override any --flyql-* variable to match your application’s design.

VariableLight DefaultDark DefaultDescription
--flyql-bg#ffffff#1e1e1eEditor background
--flyql-text#1e1e1e#d4d4d4Text color
--flyql-border#d4d4d4#525252Border color
--flyql-border-focus#075985#0369a1Border color when focused
--flyql-placeholder-color#a0a0a0#676767Placeholder text
--flyql-error-color#ff0000#f48771Error highlight
VariableLight DefaultDark DefaultDescription
--flyql-key-color#0451a5#6e9fffColumn/key names
--flyql-operator-color#0089ab#0089abOperators (=, !=, and, etc.)
--flyql-value-color#8b0000#ce9178String values
--flyql-number-color#098658#b5cea8Numeric values
VariableLight DefaultDark DefaultDescription
--flyql-dropdown-bg#ffffff#252526Panel background
--flyql-dropdown-border#d4d4d4#454545Panel border
--flyql-dropdown-item-hover#f7f7f7#2e3132Hovered item
--flyql-dropdown-item-active#eef4fb#1a2a3aSelected item
VariableDefaultDescription
--flyql-font-family'Open Sans', sans-serifUI font
--flyql-code-font-familymonospaceCode/query font
--flyql-font-size13pxBase font size

The light theme is the default. No additional classes are needed:

<FlyqlEditor v-model="query" :columns="columns" />

Use the dark prop to enable the built-in dark theme:

<FlyqlEditor v-model="query" :columns="columns" :dark="isDark" />
<FlyqlColumns v-model="expr" :columns="columns" :dark="isDark" />

The dark prop applies the flyql-dark class to the suggestion panel, which is teleported to <body> and can’t inherit from ancestor wrappers. The editor input itself continues to inherit CSS variables from its ancestors as normal, so wrapper-level overrides still work.

Alternatively, you can apply the flyql-dark class to <html> or <body>, which will reach both the editor and the teleported panel via CSS variable inheritance:

document.documentElement.classList.toggle('flyql-dark', isDark)

Override specific variables in your CSS:

/* Custom brand theme */
:root {
--flyql-border-focus: #7c3aed;
--flyql-key-color: #7c3aed;
--flyql-operator-color: #059669;
--flyql-dropdown-item-active: #ede9fe;
}
/* Custom dark overrides */
.flyql-dark {
--flyql-bg: #0f172a;
--flyql-text: #e2e8f0;
--flyql-border: #334155;
--flyql-key-color: #a78bfa;
--flyql-dropdown-bg: #1e293b;
}

Theme a specific editor instance by wrapping it in a container with overrides:

<div class="my-editor-theme">
<FlyqlEditor v-model="query" :columns="columns" />
</div>
<style>
.my-editor-theme {
--flyql-font-size: 15px;
--flyql-border-focus: #2563eb;
--flyql-bg: #f8fafc;
}
</style>

CSS custom properties cascade, so overrides on any ancestor apply to all FlyQL components within.