customization

Utilities and Variables

Additional utility classes and CSS variables that FlyonUI uses for components and themes.

FlyonUI provides an adaptable system of utility classes and CSS variables, enabling you to easily integrate components and customize themes across your project.

Below is a comprehensive overview of the essential utility classes and variables used throughout FlyonUI components.

FlyonUI offers a variety of color utilities, including the primary color, which can be applied using standard Tailwind CSS utilities. These utilities can be used across various properties, making it simple to style your elements with ease.

Learn more about color names .

For example, use the primary color class with any Tailwind CSS utility like so:

Class Name
Description
bg-primarySets the background color to the primary color
to-primarySets the ending color for a gradient to the primary color
via-primarySets the middle color for a gradient to the primary color
from-primarySets the starting color for a gradient to the primary color
text-primarySets the text color to the primary color
ring-primarySets the ring color to the primary color
fill-primarySets the fill color for SVG elements to the primary color
caret-primarySets the caret color to the primary color
stroke-primarySets the stroke color for SVG elements to the primary color
border-primarySets the border color to the primary color
divide-primarySets the dividing border color to the primary color
accent-primarySets the accent color to the primary color
shadow-primarySets the shadow color to the primary color
outline-primarySets the outline color to the primary color
decoration-primarySets the text decoration color to the primary color
placeholder-primarySets the placeholder text color to the primary color
ring-offset-primarySets the ring offset color to the primary color
bg-primary/50Background with 50% opacity

FlyonUI includes extended border radius utilities that dynamically adjust based on the active theme. These custom radius classes are designed to provide unique shapes for elements like tooltips, buttons, and cards.

You can apply any Tailwind border-radius utility, such as rounded-r-box or rounded-tr-field, as needed for different components.

rounded-selector
rounded-field
rounded-box
Class Name
CSS Variable
Description
rounded-boxvar(--radius-box)For large components like cards, modals, and alerts
rounded-fieldvar(--radius-field)For medium-sized components like buttons, inputs, selects, and tabs
rounded-selectorvar(--radius-selector)For small components like checkboxes, toggles, and badges

Customize these CSS variables for each theme. Explore more about color names .

CSS Variable
Description
var(--color-primary)Primary brand color
var(--color-primary-content)Content color to use on the primary color background
var(--color-secondary)Secondary brand color
var(--color-secondary-content)Content color to use on the secondary color background
var(--color-accent)Accent brand color
var(--color-accent-content)Content color to use on the accent color background
var(--color-neutral)Neutral dark color
var(--color-neutral-content)Content color to use on the neutral color background
var(--color-base-100)Base color for page backgrounds
var(--color-base-200)Darker shade of the base color
var(--color-base-300)Even darker shade of the base color
var(--color-base-content)Content color to use on the base color background
var(--color-info)Info color
var(--color-info-content)Content color to use on the info color background
var(--color-success)Success color
var(--color-success-content)Content color to use on the success color background
var(--color-warning)Warning color
var(--color-warning-content)Content color to use on the warning color background
var(--color-error)Error color
var(--color-error-content)Content color to use on the error color background
var(--radius-selector)Border radius for selectors like checkboxes, toggles, badges, etc.
var(--radius-field)Border radius for fields like inputs, selects, tabs, etc.
var(--radius-box)Border radius for boxes like cards, modals, alerts, etc.
var(--size-selector)Base size for selectors like checkboxes, toggles, badges, etc.
var(--size-field)Base size for fields like inputs, selects, tabs, etc.
var(--border)Border width for all components
var(--depth)(binary) Adds depth effect to relevant components
var(--noise)(binary) Adds noise effect to the background of relevant components

Some FlyonUI components utilize their own CSS variables for fine-grained customization. These allow you to adjust the appearance of individual components with greater control.

Component
CSS Variable
Description
Alert--alert-colorSets the color of the alert
Badge--badge-colorSets the color of the badge
--sizeSets the size of the badge
Button--btn-colorSets the background color of the button
--btn-fgSets the foreground color of the button
--btn-shadowSets the shadow effect of the button
--btn-noiseSets the noise effect on the button (if enabled)
--btn-pSets the padding of the button
--sizeSets the size of the button
--dark-shadeDark shade generated for gradient buttons based on btn-color
Card--card-pSets the padding of the card body
--card-borderSets the border width of the card
--card-shadowSets the shadow effect of the card
Checkbox--sizeSets the size of the checkbox
--input-colorSets the border and background color when the checkbox is checked
Indicator--indicator-tSets the top position of the indicator
--indicator-bSets the bottom position of the indicator
--indicator-sSets the start position of the indicator
--indicator-eSets the end position of the indicator
--indicator-ySets the vertical position of the indicator
--indicator-xSets the horizontal position of the indicator
Input--input-colorSets the color of the input
--sizeSets the size of the input
Kbd--sizeSets the size of the keyboard element
Link--link-colorSets the color of the link
Menu--menu-active-fgSets the foreground color of the active menu item
--menu-active-bgSets the background color of the active menu item
Radial Progress--valueSets the value of the radial progress
--sizeSets the size of the radial progress
--thicknessSets the thickness of the radial progress
--radialprogressUsed for calculating the position of the radial progress
Radio--input-colorSets the border and background color when the radio button is checked
--sizeSets the size of the radio button
Range--range-colorSets the background color of the range slider thumb
--range-thumb-sizeSets the color of the range slider thumb
--range-thumb-border-widthSets the size of the range slider thumb
--range-track-heightSets the track height for the range slider
Select--input-colorSets the color of the input in the select
--sizeSets the size of the select element
Switches--input-colorSets the color of the switch’s background, border, or text
--toggle-pSets the padding of the toggle
--sizeSets the size of the toggle
Tab--tabs-heightSets the height of the tabs
--tabs-directionSets the direction of the tabs
--sizeSize of tab
--tab-pSets the padding of the tab
--tab-bgSets the background color of the tab
--tab-border-colorSets the border color of the tab
--tab-borderBorder width for tab
--tab-gradLifted tab utility
--tab-radiusLifted tab radius
Textarea--input-colorSets the color of the textarea
--sizeSets the size of the textarea
Timeline--timeline-row-startSets the start position of the timeline row
--timeline-row-endSets the end position of the timeline row
--timeline-col-startSets the start position of the timeline column
--timeline-col-endSets the end position of the timeline column
Glass--glass-blurSets the blur intensity of the glass effect
--glass-opacitySets the opacity of the glass effect
--glass-reflect-degreeSets the reflection degree of the glass effect
--glass-reflect-opacitySets the opacity of the glass reflection
--glass-border-opacitySets the opacity of the glass border
--glass-text-shadow-opacitySets the opacity of the glass text shadow
Join--join-ssSets the start start border radius for the join
--join-seSets the start end border radius for the join
--join-esSets the end start border radius for the join
--join-eeSets the end end border radius for the join

These variants are designed for headless JS components like dropdowns, overlays, tooltips, etc. They function similarly to other TailwindCSS-like state or responsive variants (e.g., checked: and md:).

These variants apply specific TailwindCSS utility classes based on a particular component’s state or condition.

Variants
Description
dropdown-open:{tw-utility-classes}Applies TailwindCSS classes when the dropdown is open
removing:{tw-utility-classes}Applies TailwindCSS classes during element removal
tooltip-shown:{tw-utility-classes}Applies TailwindCSS classes when the tooltip is visible
accordion-item-active:{tw-utility-classes}Applies TailwindCSS classes when an accordion item is active
accordion-selected:{tw-utility-classes}Applies TailwindCSS classes when an accordion item is selected
collapse-open:{tw-utility-classes}Applies TailwindCSS classes when a collapse element is open
active-tab:{tw-utility-classes}Applies TailwindCSS classes when a tab is active
overlay-open:{tw-utility-classes}Applies TailwindCSS classes when an overlay is open
overlay-layout-open:{tw-utility-classes}Applies TailwindCSS classes when an overlay layout is open
overlay-backdrop-open:{tw-utility-classes}Applies TailwindCSS classes when an overlay backdrop is open
scrollspy-active:{tw-utility-classes}Applies TailwindCSS classes when an element is active in scrollspy
carousel-active:{tw-utility-classes}Applies TailwindCSS classes when a carousel item is active
carousel-disabled:{tw-utility-classes}Applies TailwindCSS classes when a carousel item is disabled
selected:{tw-utility-classes}Applies TailwindCSS classes when an element is selected
select-disabled:{tw-utility-classes}Applies TailwindCSS classes when a select element is disabled
select-active:{tw-utility-classes}Applies TailwindCSS classes when a select element is active
select-opened:{tw-utility-classes}Applies TailwindCSS classes when a select dropdown is opened
input-number-disabled:{tw-utility-classes}Applies TailwindCSS classes when a number input is disabled
pin-input-active:{tw-utility-classes}Applies TailwindCSS classes when a pin input field is active
password-active:{tw-utility-classes}Applies TailwindCSS classes when a password field is active
stepper-active:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is active
stepper-success:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is successful
stepper-completed:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is completed
stepper-error:{tw-utility-classes}Applies TailwindCSS classes when a stepper step encounters an error
stepper-processed:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is processed
stepper-disabled:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is disabled
stepper-skipped:{tw-utility-classes}Applies TailwindCSS classes when a stepper step is skipped
strong-password:{tw-utility-classes}Applies TailwindCSS classes when a password is strong
strong-password-accepted:{tw-utility-classes}Applies TailwindCSS classes when a strong password is accepted
strong-password-active:{tw-utility-classes}Applies TailwindCSS classes when a strong password is actively typed
combo-box-active:{tw-utility-classes}Applies TailwindCSS classes when a combo box is active
combo-box-selected:{tw-utility-classes}Applies TailwindCSS classes when a combo box item is selected
combo-box-has-value:{tw-utility-classes}Applies TailwindCSS classes when a combo box has a value
combo-box-tab-active:{tw-utility-classes}Applies TailwindCSS classes when a tab in the combo box is active
file-upload-complete:{tw-utility-classes}Applies TailwindCSS classes when a file upload is complete

Create a stunning frosted-glass appearance in your UI with the glass class. This effect adds a sleek matte finish to your components, ideal for modern, layered UI designs.

Glass
<div class="glass">Glass</div>