Best practices
Habits that keep building smooth and your projects maintainable.
Style with tokens, not one-offs
Set a theme and use scope tokens so a restyle is one decision. Avoid hard-coded colors on individual elements — they won't follow a theme change.
Structure with containers
Group related content in Sections, Cards, and Stacks. A clean structure is easier to restyle, rearrange, and reason about — and the Layers panel stays readable.
Keep secrets in the Data panel
Never paste API keys or database strings into chat. Add them to a connection — they're encrypted and server-side. See Connecting data.
One dataset per question
Give each query its own target key and aggregate in SQL. Bind many bricks to one dataset rather than fetching the same data repeatedly.
Start from a template when one fits
Beginning from a template teaches you the building blocks and is faster than a blank canvas.
Test before you ship
Use testing to confirm the built site renders and key flows work.