Critical Rules
- •ALWAYS use
rx.vstackorrx.hstackfor layout instead of raw CSS if possible. - •ALWAYS use a consistent spacing and color palette (Glassmorphism).
- •ALWAYS separate state logic into
Stateclasses. - •AVOID "AI slop" aesthetics:
- •NO excessive centered layouts.
- •NO purple/generic gradients.
- •NO perfectly uniform rounded corners (use variable radii for a more organic, premium feel).
- •AVOID standard fonts like Inter if better alternatives (Roboto, Outfit) are available.
Example
python
def goal_card(goal: dict) -> rx.Component:
return rx.box(
rx.text(goal["title"], font_weight="bold"),
rx.text(goal["description"]),
border="1px solid #e1e1e1",
padding="4",
border_radius="lg",
)