Getting started
The Felt Style Language (FSL) is a JSON-based specification for styling data layers in Felt — comparable to the Mapbox Style Spec, but at the layer level. A single JSON object describes how a layer is drawn (paint), labeled (label), classified (config), and presented in popups and legends.
Where you use FSL
The same style object works in three places:
In the Felt app — open a layer's overflow menu and choose
Actions > Edit style languageto view and edit the layer's FSL directly. (The neighbouringActions > Edit stylesopens the visual style editor, which has no JSON view.)Via the REST API — read a layer's
stylefield and update it withPOST /update_style.Via the JS SDK — apply session-only style changes with
setLayerStyle.
Your first style
Every style needs a version and a type. Here is a complete, minimal style that draws a point layer in green with a visible stroke:
{
"version": "2.3.1",
"type": "simple",
"config": {},
"paint": {
"color": "#28A745",
"size": 8,
"strokeColor": "auto",
"strokeWidth": 1
},
"legend": {},
"label": {},
"popup": {}
}Paste this into Actions > Edit style language on any point layer and the points turn green immediately. From here, styling is incremental: change "type" to "categorical" or "numeric" to drive color or size from your data, add steps or categories to config, and swap literal colors for @palette shortcuts.
Anatomy of a style
version
The FSL version the style is written against. Use "2.3.1" (current). Older versions are accepted and migrated automatically.
type
The visualization type: simple, categorical, numeric, heatmap, h3, or hillshade. See Types of visualizations.
config
Data configuration: which attribute drives the visualization, class breaks, categories, aggregation. See The config block.
paint
How geometries and pixels are drawn: colors, sizes, strokes, opacity, icons. See The paint block.
label
Feature labels: fonts, halos, placement, zoom range. See The label block.
popup
What clicking a feature shows. See The popup block.
attributes
Display names and number formatting for attributes. See The attributes block.
filters
Which features are visible. See The filters block.
legend
Legend labels. See Legends.
Explore the language
Style definition blocks
Learn how to define and configure the code blocks that compose the Felt Style Language
Style definition blocksTypes of visualizations
Learn about visualization types, including simple, categorical, numeric (color by & size by), heatmaps, H3, and raster (imagery, numeric, categorical, and hillshade).
Types of visualizationsColors, icons & classification
Shared building blocks referenced throughout the language: smart "auto" colors and named palettes, the icon catalog, and the classification methods used to turn numbers into classes.
Zoom-based styling
Vary paint and label properties with the map's zoom level using interpolators.
Zoom-based stylingLegends
Details on how to customize legends on a per-layer basis.
LegendsErrors
Definitions for errors raised when validating the Felt Style Language.
ErrorsExamples
A compact gallery with one worked example per visualization type.
ExamplesLast updated
Was this helpful?