Theme Customizer

Common CSS (Spacing & Position Utilities)

FrankUI provides utility helper classes for rapid layout adjustments, positioning elements, and spacing. These utilities form the foundation for more advanced responsive interfaces.

Design Token: The base spacing step is 4px (defined as --spacing-step). For example, a level 5 spacing represents 20px (5 × 4px).

Visual Spacing Playground

Use the controls below to dynamically adjust the margin and padding levels on the sample element, simulating how the CSS spacing scales look in practice.

m-4 (16px)
p-5 (20px)
Target Element Content
Outer Margin Area (Orange) Inner Padding Area (Green)

Classes Reference

All spacing classes use the format [property][direction]-[level]. The following values are supported:

Properties Directions Levels (1 to 10)
Margin: m-
Padding: p-
(None) - All sides
t - Top
r - Right
b - Bottom
l - Left
1: 4px | 2: 8px | 3: 12px
4: 16px | 5: 20px | 6: 24px
7: 28px | 8: 32px | 9: 36px
10: 40px

Static HTML Usage Example

<!-- Card component with margin bottom level 6 (24px) and padding level 4 (16px) -->
<div class="card mb-6 p-4">
    <div class="card-header">Spacing Utilities</div>
    <div class="card-content">
        <button class="btn primary mt-3 mr-2">Submit</button>
        <button class="btn secondary mt-3">Cancel</button>
    </div>
</div>

Positioning Classes

Use position utilities to layout elements, build sticky headers, overlay actions, or create fixed components.

Live Position Demo

Select a class to position the target box (blue) within the viewport container (gray dotted border, relative layout).

Scroll inside this box to test sticky positioning.

Target Element Box

Additional sandbox content representing height...

Base Utilities Reference

Class Applied Style Usage Notes
.pos-static position: static !important; Default normal document flow.
.pos-relative position: relative !important; Positioned relative to its normal flow; acts as anchor for absolute elements.
.pos-absolute position: absolute !important; Positioned relative to the nearest positioned ancestor.
.pos-fixed position: fixed !important; Positioned relative to the viewport. Remains in place on scroll.
.pos-sticky position: sticky !important;
top: 0 !important;
align-self: flex-start !important;
Behaves relative until scrolling reaches a threshold, then sticks.
.fixed-top position: fixed !important;
top: 0 !important; left: 0 !important; right: 0 !important;
Affixes an element to the very top of the window, spanning full width.
.fixed-bottom position: fixed !important;
bottom: 0 !important; left: 0 !important; right: 0 !important;
Affixes an element to the very bottom of the window, spanning full width.

Best Practices

  • Creating Positioning Contexts: Use .pos-relative to create a positioning context for absolutely positioned child elements.
  • Fixed Headers and Footers: When using .fixed-top or .fixed-bottom, add appropriate padding to the body or main content to prevent content from being hidden behind these fixed elements.
  • Sticky Positioning: Be aware that .pos-sticky requires a scrollable container and may not work in all browsers. Always test thoroughly.
  • Responsive Positioning: Use responsive variants to change positioning behavior based on screen size, which is particularly useful for navigation elements that might be fixed on desktop but static on mobile.
  • Combining with Other Utilities: These position utilities work well with other framework utilities:
    • Use with spacing utilities to add padding or margin
    • Use with z-index utilities to control stacking order
    • Use with width and height utilities to control dimensions

Responsive Breakpoints

Position helper classes have responsive variations that apply at specific viewport width thresholds. The pattern follows .{class}-{breakpoint}.

Exception Note: The classes .pos-sticky, .fixed-top, and .fixed-bottom do not have responsive variants.
Breakpoint Prefix Applies At Example Class
-xs ≥ 480px .pos-relative-xs
-sm ≥ 576px .pos-absolute-sm
-md ≥ 768px .pos-static-md
-lg ≥ 992px .pos-fixed-lg
-xl ≥ 1200px .pos-relative-xl
-xxl ≥ 1400px .pos-absolute-xxl
-xxxl ≥ 1600px .pos-static-xxxl

Responsive Code Example

<!-- Absolute positioned block on large screens, standard relative block on mobile -->
<div class="pos-relative pos-absolute-lg" style="top: 20px; right: 20px;">
    <span>Responsive Badge</span>
</div>

<!-- Element fixed on tablet screens and above, static on mobile -->
<div class="pos-static pos-fixed-md" style="bottom: 10px; left: 10px;">
    <p>Floating Action Bar</p>
</div>

Heading Typography Sizes

The framework specifies customizable typography sizes for all standard heading elements (H1 to H6) using CSS root variables. These can be overridden dynamically or in your custom stylesheets.

Live Typography Scaling

Modify the values below to adjust heading sizes across the site dynamically.

H1 Heading Size Sample

H2 Heading Size Sample

H3 Heading Size Sample

H4 Heading Size Sample

H5 Heading Size Sample
H6 Heading Size Sample

Typography Variables Reference

Variable Default Value Description
--h1-size 2rem Font size for h1 headings
--h2-size 1.5rem Font size for h2 headings
--h3-size 1.25rem Font size for h3 headings
--h4-size 1rem Font size for h4 headings
--h5-size 0.875rem Font size for h5 headings
--h6-size 0.75rem Font size for h6 headings

Display Classes

Large, eye-catching text styles for hero sections, titles, and major landing page headers:

Display 4
Display 3
Display 2
Display 1
Class Font Size Font Weight
.display4 112px 200 (Light)
.display3 56px 400 (Regular)
.display2 48px 400 (Regular)
.display1 36px 400 (Regular)

Heading Classes

Heading helper classes let you apply standard heading font sizes to any HTML tag (like <span>, <p>, or <div>):

Span tag with class .h1

P tag with class .h2

Div tag with class .h3
Span tag with class .h4

Live Font Settings Customizer

Customize the global font family, base size, line height, and font weight variables to see how they modify the document's body text rendering.

This preview paragraph uses the --font-name, --font-size, --line-height, and --font-weight variables. Changing the inputs above will dynamically update these variables in real-time inside the isolated container styles.

Font Settings Reference

Metro UI uses CSS variables to configure the primary font styles globally. These can be adjusted at the root stylesheet:

Variable Default Value Description
--font-name -apple-system, BlinkMacSystemFont, "Segoe UI", ... System font stack prioritizing local OS rendering
--font-size 1rem Base typography font size for body elements
--line-height 1.5 Base line height for layout copy readability
--font-weight 400 Default text font weight

Cursor Utilities

FrankUI offers a comprehensive suite of utility classes to control the mouse cursor display. All classes use the .c-[type] naming convention.

Interactive Hover Sandbox

Hover your mouse over the cards below to see the respective cursors render live in your browser.

🖱️
c-auto Default browser cursor
c-default Standard arrow
👆
c-pointer Link / Clickable hand
c-wait Busy / Wait hourglass
🌀
c-progress Background working
c-text Text selection I-beam
c-move Drag / Move element
🚫
c-not-allowed Disabled action
c-grab Grabbable item
c-grabbing Active grabbing
🔍+
c-zoom-in Zoom in detail
🔍-
c-zoom-out Zoom out detail

Cursor Reference Table

Class CSS Property Description
.c-autocursor: auto;Default cursor context
.c-defaultcursor: default;Standard arrow
.c-nonecursor: none;No cursor rendered
.c-helpcursor: help;Help question mark
.c-pointercursor: pointer;Hand icon for links
.c-progresscursor: progress;Loading arrow + circle
.c-waitcursor: wait;Hourglass wait indicator
.c-cellcursor: cell;Spreadsheet cell target cross
.c-crosshaircursor: crosshair;Selection crosshair
.c-textcursor: text;I-beam text select bar
.c-text-verticalcursor: vertical-text;Vertical text selector
.c-aliascursor: alias;Shortcut link alias arrow
.c-copycursor: copy;Copy utility addition sign
.c-movecursor: move;Movement drag pointer
.c-no-dropcursor: no-drop;Cannot release drop here
.c-not-allowedcursor: not-allowed;Action forbidden / Disabled
.c-all-scrollcursor: all-scroll;Scroll viewport directions
.c-col-resizecursor: col-resize;Column adjust horizontal resize
.c-row-resizecursor: row-resize;Row adjust vertical resize
.c-n-resizecursor: n-resize;North resize arrow
.c-e-resizecursor: e-resize;East resize arrow
.c-s-resizecursor: s-resize;South resize arrow
.c-w-resizecursor: w-resize;West resize arrow
.c-ne-resizecursor: ne-resize;Northeast resize diagonal
.c-nw-resizecursor: nw-resize;Northwest resize diagonal
.c-se-resizecursor: se-resize;Southeast resize diagonal
.c-sw-resizecursor: sw-resize;Southwest resize diagonal
.c-ew-resizecursor: ew-resize;East-West resize arrow
.c-ns-resizecursor: ns-resize;North-South resize arrow
.c-nesw-resizecursor: nesw-resize;NE-SW resize diagonal
.c-nwse-resizecursor: nwse-resize;NW-SE resize diagonal
.c-zoom-incursor: zoom-in;Zoom in magnifier
.c-zoom-outcursor: zoom-out;Zoom out magnifier
.c-grabcursor: grab;Grabbable open hand
.c-grabbingcursor: grabbing;Grabbing closed fist

Visibility & Display Utilities

Control elements visibility and display states dynamically. These classes are useful for toggling sections, constructing grid systems, or responsive visibility.

Live Display & Visibility Sandbox

Select a display or visibility utility to see how it affects the target element (blue) and the surrounding elements (green & red).

Left Box
Target Box
Right Box

Display & Visibility Classes Reference

Class Applied Style Description
.visiblevisibility: visible !important;Makes an element visible
.no-visiblevisibility: hidden !important;Hides an element but preserves its space in layout
.d-nonedisplay: none !important;Hides an element completely
.d-blockdisplay: block !important;Displays an element as block-level
.d-inlinedisplay: inline !important;Displays an element as inline flow
.d-inline-blockdisplay: inline-block !important;Displays an element as inline-block
.d-tabledisplay: table !important;Displays an element as a table container
.d-table-rowdisplay: table-row !important;Displays an element as a table row
.d-table-celldisplay: table-cell !important;Displays an element as a table cell

Responsive Breakpoint Utilities

Responsive visibility classes let you show or hide elements at specific breakpoints (e.g. .d-none-md, .visible-lg):

Breakpoint Prefix Applies At Example Display Class Example Visibility Class
-xs≥ 480px.d-block-xs.visible-xs
-sm≥ 576px.d-none-sm.no-visible-sm
-md≥ 768px.d-inline-block-md.visible-md
-lg≥ 992px.d-table-lg.no-visible-lg
-xl≥ 1200px.d-none-xl.visible-xl
-xxl≥ 1400px.d-block-xxl.no-visible-xxl
-xxxl≥ 1600px.d-inline-xxxl.visible-xxxl

Responsive Visibility Code Example

<!-- Hide completely on mobile, display as block on desktop (large screens) -->
<div class="d-none d-block-lg">
    <p>Desktop-only content</p>
</div>

<!-- Preserve layout spacing but hide on medium screens and up -->
<div class="visible no-visible-md">
    <p>Placeholder space...</p>
</div>

Border Utilities

FrankUI includes lightweight border helpers to quickly apply borders, styles, colors, thicknesses, and rounded corners without custom styling rules.

Live Border Sandbox

Customize the border classes on the target element below to see how they render in real-time.

Target Box
Classes: border border-solid border-size-1 bd-primary

Borders Reference

Class Name Applied Style Description
.borderborder: 1px solid var(--secondary-color) !important;Adds a border on all sides
.border-topborder-top: 1px solid var(--secondary-color) !important;Adds a top border
.border-rightborder-right: 1px solid var(--secondary-color) !important;Adds a right border
.border-bottomborder-bottom: 1px solid var(--secondary-color) !important;Adds a bottom border
.border-leftborder-left: 1px solid var(--secondary-color) !important;Adds a left border
.border-solid
.border-dashed
.border-dotted
border-style: solid !important;
border-style: dashed !important;
border-style: dotted !important;
Controls the border drawing style
.border-size-1 ... 20border-width: [level]px !important;Sets border thickness (1px to 20px)
.border-radius-1 ... 20border-radius: [level]px !important;Sets border roundedness (1px to 20px)
.roundedborder-radius: 4px !important;Applies default rounded corner
.to-cycleborder-radius: 50% !important;Transforms block into a circle/oval
.bd-primary
.bd-success
.bd-alert
border-color: var(--primary-color) !important;
border-color: var(--success-color) !important;
border-color: var(--alert-color) !important;
Sets border color mapping to framework theme variables

Removing Borders (Responsive Variants)

Borders can be removed globally or per direction. You can also hide borders selectively starting at any breakpoint (e.g. .border-none-md, .border-top-none-lg):

Class Pattern Description
.border-noneRemoves all borders
.border-[direction]-noneRemoves border on specific side (top, right, bottom, left)
.border-none-{breakpoint}Removes all borders at breakpoint and above (xs, sm, md, lg, xl, xxl, xxxl)
.border-[direction]-none-{breakpoint}Removes border on side starting at breakpoint and above

Border Markup Code Example

<!-- Div with 3px dashed primary color border and custom rounded corners -->
<div class="border border-dashed border-size-3 border-radius-8 bd-primary p-4">
    <p>Custom styled container</p>
</div>

<!-- Button circular with solid success color border -->
<button class="border border-solid border-size-2 to-cycle bd-success">
    ✏️
</button>

Color Utilities

Apply background, foreground (text), and border colors quickly using prefix-based utility classes. All color utilities are defined with !important to guarantee they apply consistently.

Usage Pattern:
  • .bg-[color-name] - Sets background color
  • .fg-[color-name] - Sets text/foreground color
  • .bd-[color-name] - Sets border color

Primary Colors

#a4c400
lime
#60a917
green
#008a00
emerald
#00aba9
teal
#1ba1e2
cyan
#0050ef
cobalt
#6a00ff
indigo
#aa00ff
violet
#f472d0
pink
#d80073
magenta
#a20025
crimson
#e51400
red
#fa6800
orange
#f0a30a
amber
#e3c800
yellow
#825a2c
brown
#6d8764
olive
#2d89ef
blue

Extended Colors

#647687
steel
#76608a
mauve
#87794e
taupe
#fad6a5
champagne
#f0e68c
khaki
#555555
charcoal
#cd7f32
bronze
#6997c3
windstorm
#e6b8a2
nude
#c25e3a
terracotta
#ff7f50
coral
#4b5320
army
#fff5ee
seashell
#c2b280
sand

Neutral & Special Colors

#1d1d1d
dark
#f8f9fa
light
#808080
gray
#5d6d7e
gray-blue
#f5f6f8
gray-white
#a0a0a0
gray-mouse
#1a1a1a
almost
#ff00ff
clown

Code Example

<!-- Custom alert panel using theme colors -->
<div class="bg-light border border-solid border-size-1 bd-orange p-3 rounded">
    <h4 class="fg-crimson mt-0">Warning Notice</h4>
    <p class="fg-charcoal mb-0">This action cannot be undone.</p>
</div>

<!-- Cobalt colored badge -->
<span class="bg-cobalt fg-white p-1 rounded">Admin</span>

Flexbox Utilities

FrankUI provides standard flexbox utilities to construct responsive layouts, manage child alignments, distribution, wrapping, and spacings in real-time.

Live Flexbox Sandbox

Customize the flex direction, justification, alignment, and gap to see how the child items flow.

Item 1
Item 2
Item 3
Classes: d-flex flex-row flex-justify-start flex-align-stretch gap-4

Flexbox Reference

Class Pattern Applied Style Description
.d-flex
.d-inline-flex
display: flex !important;
display: inline-flex !important;
Enables flex context on container
.flex-row
.flex-column
...-reverse
flex-direction: row !important;
flex-direction: column !important;
...-reverse !important;
Controls flow direction of flex children
.flex-wrap
.flex-nowrap
.flex-wrap-reverse
flex-wrap: wrap !important;
flex-wrap: nowrap !important;
flex-wrap: wrap-reverse !important;
Controls wraps when children exceed dimensions
.flex-justify-start ... end
...-center / between / around
justify-content: flex-start !important;
justify-content: space-between !important;
Distributes children along the main flow axis
.flex-align-start ... end
...-center / stretch
align-items: flex-start !important;
align-items: center !important;
Aligns children along the cross axis
.flex-self-start ... end
...-center / stretch
align-self: flex-start !important;
align-self: center !important;
Applied to children; overrides parent's cross alignment
.flex-grow-0
.flex-grow-1
flex-grow: 0 !important;
flex-grow: 1 !important;
Controls item growth capacity
.order-0 ... 12order: [index] !important;Sets rendering order order index
.gap-0 ... 12gap: [level * 4]px !important;Sets spacing gap between rows/columns (0px to 48px)

Responsive Breakpoint Utilities

Responsive variants (e.g. .flex-column-md) allow you to rearrange column listings on mobile/tablets into side-by-side row grids on desktop:

<!-- Stack on mobile, horizontal row layout on desktop (medium screen & above) -->
<div class="d-flex flex-column flex-row-md gap-4">
    <div class="card">Sidebar content</div>
    <div class="card flex-grow-1">Main content area</div>
</div>

Image Utilities

Apply sizing, responsiveness, thumbnails, and interactive hover overlays directly to images in FrankUI.

Live Layout Previews

Hover over the cards below to see zoom scaling and sliding overlays in action.

Fluid Responsive (.img-fluid)

Scales dynamically to fit the width of its parent block.

Fluid Responsive
Thumbnail (.img-thumbnail)

Adds standard padding, a subtle border, and background frame.

Thumbnail Image
Container Overlay (.img-container)

Combines zoom, overlays, and transition slide-up effects.

Overlay Zoom
Scenic Overlay

Zoom + Slide Up

Images Reference

Class Properties Description
.img-fluidmax-width: 100% !important;
height: auto !important;
Makes an image scale responsively inside its parent wrapper
.img-thumbnailpadding: .25rem !important;
border: 1px solid var(--secondary-color) !important;
border-radius: 4px !important;
Framer thumbnail style with padding, border, and background
.img-containerposition: relative;
overflow: hidden;
display: inline-block;
Position context wrapper enabling overlays and zooms
.zoomtransform: scale(1.08);Applied to .img-container; zooms image slightly on hover
.image-overlayposition: absolute;
opacity: 0;
transition: opacity .3s;
Overlay block placed inside .img-container; fades in on hover
.slide-uptransform: translateY(100%);
transition: transform .3s;
Applied to .img-container; makes overlay slide up from bottom

Code Example

<!-- Responsive fluid image wrapper with zoom and sliding text overlay -->
<div class="img-container zoom slide-up rounded">
    <img src="ocean-view.jpg" alt="Ocean View">
    <div class="image-overlay">
        <h4>Ocean Breeze</h4>
        <p>Sunset at the coastline</p>
    </div>
</div>

DOM Selector Wrapper ($)

FrankUI includes a lightweight, vanilla wrapper function $() that offers a jQuery-like API for element selection, property retrieval/mutations, checking matches, and event bindings without the overhead of loading the entire jQuery library.

Live Wrapper Playground

Interact with the controls below and trigger wrapper methods to see returned outputs logged in real-time.

Wrapper Logs:
(Log initialized. Click action buttons to execute selector methods.)

API Reference

Method Signature Description
$(selector)$(string | element | list)Selects element(s) and returns selector wrapper context
.val().val( [value] )Gets or sets the value of selected input/control element
.prop().prop( propertyName, [value] )Gets or sets properties (e.g. checked, disabled) of elements
.is().is( selectorStr )Checks matches against selector helper (e.g. :checked, :disabled)
.on() / .click().on( events, handler )Binds event listener(s) to all selected elements
.addClass() / .removeClass().addClass( className )Adds or removes class strings from element lists
.toggleClass().toggleClass( className )Toggles CSS classes of matched element arrays
.find().find( selector )Searches descendants matching selector
.parent() / .closest().closest( selector )Finds parent element or closest matching ancestor wrapper
.attr().attr( name, [value] )Gets or sets DOM attributes
.text() / .html().text( [content] )Gets or sets textContent / innerHTML configurations
.css().css( prop, [value] )Gets or sets CSS styling values dynamically
.trigger().trigger( eventName )Triggers custom or built-in event calls on elements

Code Example

// Perform tasks using standard jQuery syntax
$('#my-form').on('submit', function(e) {
    if ($('#agree-check').is(':checked')) {
        console.log('User value:', $('#username').val());
        $('#agree-check').prop('disabled', true);
    } else {
        e.preventDefault();
        $('#error-msg').text('You must accept the terms first!').addClass('fg-red');
    }
});