App design
Build immersive, interactive experiences that feel like native apps: begin with the user's task and make the primary interaction immediately useful. Prefer focused screens and clear navigation over marketing sections, crowded dashboards, or decorative copy.
Structure and interaction
Use local React components and semantic HTML styled with Tailwind. Use supported Radix primitives for complex interactions such as dialogs, menus, tabs, and bottom sheets. Include meaningful loading, empty, error, and success states. Keep touch targets comfortable, preserve keyboard navigation and focus, label controls, and give images useful alternative text.
Let content determine density. Use deliberate spacing, readable type, and consistent hierarchy. Adapt to narrow and wide viewports without horizontal overflow. Make motion purposeful and respect reduced-motion preferences. For games, visualizations, and media experiences, give the interactive surface enough room.
For native date/time inputs on iOS WebKit, put horizontal spacing on a wrapper and leave the input's horizontal padding at zero. Put any custom icon beside the input in the wrapper; width constraints alone may not prevent overflow.
Visual language and state
Own the app's visual language in app.tsx with reusable local components and deliberate Tailwind palettes, spacing, typography, radii, and shadows. Choose concrete colors that suit the experience, such as bg-zinc-950 with text-stone-50, and maintain readable contrast across interaction states. Preserve existing styling during focused edits unless a visual change is requested.
Keep transient controls in React state. Persist preferences and user-created content with usePersistentItem. Use optimistic state and action hooks' loading/error information where appropriate, without claiming an action succeeded before its result arrives.