Pages
Introduction Colors & Tokens Icons
UI
Button Link Badge Notification Badge Alert Card Spinner Avatar Divider Empty State
Interactive
Modal Side Modal Dropdown Tooltip Accordion Tabs Flash Toast
Forms
Form Select Toggle Checkbox & Radio Text Fields Date & Time Fields
Layout
Navbar Sidebar Table Pagination Breadcrumbs Selector List
Utilities
Local Time

Introduction

AppTheme is the shared theme and UI library for Dos applications — design tokens, ViewComponents and vanilla-JS behaviours packaged as a Rails engine.

Every page in this styleguide renders live components straight from the gem, next to the Haml that produced them. The chrome of this site — sidebar, navbar, the filter field above — is itself built with AppTheme components.

Components are rendered through app_theme_* helpers. Styles never use raw values: everything resolves through role tokens like var(--app-color-primary) so apps re-theme by swapping a theme file, not by touching component CSS.

Using the gem in an app

# Gemfile
source "https://rubygems.pkg.github.com/dosfinds" do
  gem "app_theme"
end

# app/views/layouts/application.html.haml
%html{ app_theme_html_attributes }
  %head
    = stylesheet_link_tag "app_theme/application"
    = javascript_include_tag "app_theme/application", defer: true
    = app_theme_favicon_tags