Skip to main content

Style Definition

Predefined Styles

Powersheet includes 20 built-in styles available without any custom definition. Custom styles defined in the styles section are merged on top of these defaults.

Status Styles

Neutral Styles

Color Styles

Style Resolution Flow

diagram

Defining Custom Styles

Using Styles with Formatters

Styles are applied to cells via the formatters section. A formatter references a style name and applies it when an expression evaluates to true.

Using Styles with Headers

Styles are applied to column headers via the header.style property on a column, or to column group headers via groupStyle and headerStyle on a column group.
See Column Groups for full group styling reference.

Color Token Reference

Styles use color tokens as shorthand for hex color values. Each color family has variants from 100 (lightest) to 700 (darkest).

Purple

Blue

Teal

Green

Orange

Red

Grey

Use descriptive style names that reflect purpose rather than appearance: readOnlyStyle, criticalCell, warningHeader rather than greyBackground or redText. This makes configurations easier to maintain when color schemes change.

Complete YAML Example

Applying Styles to Headers

Header styles are applied through the header.style property on individual columns and the groupStyle / headerStyle properties on column groups.

Column Header Style

Reusing Header Styles with YAML Anchors

YAML anchors reduce repetition when multiple columns share the same header style:

Column Group Header Style

How to Apply a Style to a Column Header Group (figure 1)
Column groups apply styles to the group header bar and optionally to all column headers within the group.

Header Style Resolution

diagram
Priority order:
  1. columns.<key>.header.style — applied if defined (highest priority)
  2. columnGroups.<id>.headerStyle — applied if column belongs to a group and no header.style is set
  3. Default white — applied if neither is defined

Custom Header Styles

Define custom styles in the styles section and reference them from header configurations:
  • Formatters — conditional styling rules that reference styles
  • Column GroupsgroupStyle and headerStyle properties
  • Columnsformatter and header column settings

Last modified on July 10, 2026