REFERENCE

API reference

The current CSS and HTML interface for RevaCSS 2.0.0. Attribute values below come from the option manifest used by the build.

Use the guide for setup and the component API for exact hooks. The API describes implemented features, not a release-validation guarantee.

Stylesheet files

Start with one complete build: global or scoped. Do not combine both. Load the matching Glass or Veil extension afterward when needed.

Generated CSS files
FilePurpose
reva.min.cssMinified equivalent of the complete global stylesheet.
reva.cssComplete readable global stylesheet. Recommended starting point.
reva.tokens.cssTheme, palette and shared setting definitions.
reva.base.cssNative element styling. Depends on token definitions.
reva.components.cssComponent bundle plus shared utilities. Depends on tokens and base.
reva.badges.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.alerts.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.accordions.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.breadcrumbs.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.pagination.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.form-groups.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.loading.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.tabs.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.lists.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.empty-states.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.avatars.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.icons.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.switches.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.input-groups.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.skeletons.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.toolbars.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.description-lists.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.card-patterns.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.navigation.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.app-shell.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.drawers.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.timeline.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.steps.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.rating.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.calendar.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.message-thread.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.charts.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.navigation-rail.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.dropdowns.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.selects.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.selects.scoped.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.motion.cssOptional opening/closing motion for native popovers and dialogs; load after the global core.
reva.motion.scoped.cssOptional scoped overlay motion; load after reva.scoped.css.
reva.glass.cssOptional global glass extension; load after the global core.
reva.glass.scoped.cssOptional scoped glass extension; load after reva.scoped.css.
reva.soft.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.soft.scoped.cssComponent-specific styling. Load its token/base dependencies and any required shared utilities.
reva.veil.cssOptional Veil material: diffused perimeter colour and contained contours without blur. Load after the global core.
reva.veil.scoped.cssOptional scoped Veil material; load after reva.scoped.css.
reva.button-materials.cssOptional action-only solid, glass, veil, soft and liquid materials; load after the core.
reva.button-materials.scoped.cssOptional action-only materials inside .reva; load after the scoped core.
reva.scoped.cssComplete styling scoped to .reva boundaries.
reva-fonts.cssOptional Manrope font declarations; copy its adjacent fonts directory.

The generated icons directory contains individual SVG files and icons/reva.svg. See icon usage and downloads.

Standalone modules are not a replacement for common dependencies. The complete build includes shared preference utilities; modular consumers must preserve the corresponding behaviours.

Shared attribute API

Set attributes on html, a parent section, or a .reva boundary. A nearer valid value overrides only that setting for supported descendants. Unsupported values retain the nearest valid inherited setting.

29 settings from tokens/options.json
AttributeValuesOmitted defaultTargets and meaning
data-palettedefault · monodefaultCoordinated page, surface, foreground, border, link and primary colours. Light/dark follows data-theme. Success, warning and error colours stay semantic.
data-themeauto · light · darkautoPage and component colour scheme: auto follows the visitor's preference.
data-accentblue · violet · teal · green · orange · rosePalette primaryPrimary actions, badges, alerts, native accent controls and checked switches. Links retain their theme colour. Explicit accents reset their foreground; omitted accents follow data-palette.
data-shapesquare · subtle · rounded · pill · customroundedStyled controls, surfaces, navigation, media, code, choice labels, avatars and placeholders. Custom uses --re-custom-surface-radius, --re-custom-field-radius and --re-custom-action-radius (nonnegative lengths; .75rem defaults). Local presets reset all three groups.
data-fillgradient · solidgradientButton, badge and alert gradients; optional glass sheen. Does not change material.
data-densitycompact · comfortable · spacious · customcomfortableControl and surface padding, list and description spacing, card sections and layout spacing. Custom separates surface padding (--re-custom-surface-padding, 1rem), control padding multiplier (--re-custom-control-density, 1), and content spacing (--re-custom-content-space, 1rem). Minimum control heights are preserved; local presets reset all groups.
data-depthflat · subtle · pronouncedsubtleAction and surface shadows. Text-control inset shadows are configured with data-controls.
data-motionnone · subtle · expressivesubtleAction transitions, accordion expansion and chevron rotation (expressive adds a fade), press movement, decorative edges, custom spinners, switch transitions and skeleton shimmer. Reduced motion wins; native progress is browser-owned.
data-typecompact · standard · largestandardPage or subtree typography.
data-bordersubtle · defined · nonesubtleStyled control and surface borders, table rules and navigation boundaries. Invalid-state and forced-colour boundaries take priority.
data-contrastauto · moreautoForeground and boundary contrast; optional glass becomes opaque. System preferences retain their component-specific priority.
data-toneneutral · cool · warmPalette surfacesOverride page and surface temperature without resetting the palette accent, links or foregrounds.
data-controlsstyled · minimalstyledText input, select and textarea backing and inset shadow.
data-widthnarrow · standard · wide · full · customstandardPage-container width. Narrow, Standard and Wide cap .container at 48rem, 75rem and 90rem. Full fills the parent with 1rem side padding. Custom uses --re-custom-max-width (75rem) and --re-custom-side-padding (1rem); max width includes padding, which is reduced in narrow containers. Local presets reset width/padding. Navbar width is configured separately.
data-tableplain · striped · borderedplainTable stripes and grid lines; rule thickness follows data-border.
data-sizesmall · medium · largemediumControls, menu actions, badges, alerts, accordion summaries, breadcrumbs, pagination, form labels, choice labels, spinners and avatars.
data-ratioauto · square · landscape · portrait · wideautoImage and video aspect ratio; auto retains natural proportions.
data-fitcover · containcoverImage, video and avatar content within constrained dimensions.
data-gapnone · small · medium · largemediumSpacing in .grid, .row, .stack, .accordion, .pagination, .tabs and .toolbar; combines with density.
data-materialsolid · glass · veil · softsolidSolid surfaces by default; optional Glass or Soft UI surfaces and actions use their matching extension. Veil is deprecated and retained for existing sites. Explicit material boundaries stop another inherited material.
data-edgeplain · gradient · shine · animatedplainDecorative borders on buttons, .button links and cards. Shine sweeps on interaction; animated turns continuously. Native action inputs keep regular borders.
data-variantprimary · success · warning · danger · neutralprimaryButton, action-input, .button link, badge and alert semantic colour. Primary uses the inherited accent; local legacy button classes override inherited variants, while a valid action-level attribute takes precedence.
data-appearancetinted · solid · outlinetintedBadge and alert backing and border treatment. Does not configure buttons.
data-navbarstandard · centered · floating · splitstandardTop navigation layout: standard brand and links, centered links, inset floating surface, or central brand with links on either side. Mobile retains the shared Menu button and popovers. Does not change sidebars.
data-navbar-positionstatic · stickystaticStatic follows normal document flow. Sticky keeps the outer header at block-start of its scroll container; layout, palette and material remain independent. Put the wrapper in the scrolling page, outside short sections.
data-navbar-spacingflush · spacedspacedFlush removes the wrapper gap and Floating margins so a sticky bar meets the safe top edge. Spaced adds wrapper breathing room, reduced on small screens, and retains Floating margins.
data-navbar-widthcontained · fullcontainedContained follows the shared page width and navbar layout. Full fills its parent with a navbar surface while aligning its contents to the shared page width. Use a page-wide wrapper to reach both screen edges; app-shell toolbars retain their grid column.
data-button-materialdefault · solid · glass · veil · soft · liquiddefaultOptional button material extension. Default follows data-material at the action; explicit choices override general material for actions only. Liquid is transparent neutral glass without accent tint; movement follows data-motion. Veil is deprecated and retained for existing sites.
data-fontmanrope · systemmanropeBody text, headings and native controls. Manrope is the framework default with system-ui/sans-serif fallback; its font stylesheet is optional. System uses system-ui/sans-serif even when Manrope is loaded. A local preset resets this choice; code remains monospace and --re-font-heading remains an optional heading override.

data-variant configures buttons, action inputs, .button links, badges and alerts. data-appearance configures only badges and alerts. Existing semantic button classes override inherited variants; a valid action-level variant overrides those classes. Material and fill remain separate settings.

Scope and behavioural boundaries

Each .reva boundary installs defaults. Configure the boundary itself or its descendants. CSS scope does not provide Shadow DOM isolation, and overlay markup must remain in its boundary.

The core relies on modern CSS including light-dark(), color-mix(), :has() and @scope. Native popovers are required for the top-menu interaction. Some enhancements have component-specific fallbacks; do not assume a complete legacy-browser fallback.

CSS does not supply routing, data loading, validation messages or arbitrary focus management. See behaviour and accessibility.