ReoGrid ReoGrid Web
cell-styles font color border lite

Cell Styles

Font styles, colors, backgrounds, text alignment, and border options — a showcase of the Cell Style API.

How it works

This demo is a comprehensive reference for ReoGrid's cell styling API. Each row demonstrates a different combination of font, color, background, alignment, and border options.

  • Font styles: bold, italic, underline, strikethrough, font family and size
  • Colors: text color, background color, both as hex strings or named colors
  • Alignment: horizontal (left, center, right) and vertical (top, middle, bottom) independently
  • Borders: top, right, bottom, left, all — each with thickness and color options
  • Styles can be applied to individual cells, ranges, rows, or columns

Key APIs used

ws.cell(row, col).setStyle(style)

Apply a style object with font, color, background, alignment, and border properties to a single cell

ws.range(ref).setStyle(style)

Apply a style to all cells in a range (e.g. 'A1:D5')

ws.row(index).setStyle(style)

Apply a style to every cell in an entire row

ws.range(ref).border(options)

Set border style (pos, width, color) on a cell range

Related Documentation

Related Demos

Stay Updated

Be first to know — get updates as they ship

Get notified of new releases, features, and announcements.
No spam — just updates that matter.