llms.txt

Theme & Styling

Snaps specify only an accent color. The client handles all other styling, including light/dark mode from app settings.

How Theming Works

The snap provides a single theme.accent color. The Farcaster client uses this accent to style interactive elements, then derives everything else -- backgrounds, text colors, borders, spacing -- from its own design system and the user's current light/dark mode preference.

{
  "version": "1.0",
  "theme": { "accent": "purple" },
  "ui": {
    "root": "page",
    "elements": {
      "page": { "type": "stack", "props": {}, "children": ["title"] },
      "title": { "type": "text", "props": { "content": "My Snap", "weight": "bold" } }
    }
  }
}

Theme Properties

PropertyRequiredValues
themeNoTheme object. If omitted, defaults apply
theme.accentNoPalette color name: gray, blue, red, amber, green, teal, purple, pink. Default: "purple"

Accent Color Palette

ColorLightDark
gray #8F8F8F #8F8F8F
blue #006BFF #006FFE
red #FC0036 #F13342
amber #FFAE00 #FFAE00
green #28A948 #00AC3A
teal #00AC96 #00AA96
purple #8B5CF6 #A78BFA
pink #F32782 #F12B82

Accent Surfaces

The accent color is used for:

  • Primary button fill
  • Progress bar fill (unless overridden by color)
  • Slider active track and thumb
  • Button group selected option highlight
  • Toggle active state fill
  • Interactive grid tap highlight

What Snaps Cannot Control

Snaps intentionally have no control over visual details. This keeps snaps consistent within the Farcaster feed and prevents visual clutter.

Snaps cannot specify:

  • Font family, font size, or font weight
  • Padding, margins, or spacing
  • Border radius, shadows, or decorative styling
  • Custom CSS or inline styles
  • Background colors on individual elements (except grid cells)
  • Element pixel dimensions
  • Light/dark mode

The client is responsible for all layout decisions — spacing between elements, card padding, font rendering, and responsive behavior — so snaps look native in every Farcaster client.