SansiStore’s UI is built on a set of enforced conventions that keep every screen consistent and dark-mode-ready with zero extra effort. The rules below come directly fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProcesosAgilesUMSS/sansistore/llms.txt
Use this file to discover all available pages before exploring further.
UI.md and src/styles/global.css — follow them on every component you touch.
The Golden Rule: Always Use Theme Tokens
Never hardcode colors. Hardcoded Tailwind color utilities likebg-white or text-gray-900 break dark mode and make the design inconsistent across pages. Always reach for a --theme-* CSS custom property.
Token Reference
All tokens are defined insrc/styles/global.css and switch values automatically between light and dark mode via html[data-theme='dark'].
| Token | Light value | Use for |
|---|---|---|
bg-(--theme-bg) | #fffbf4 | Page background |
text-(--theme-text) | #1e1e1e | Body text |
bg-(--theme-card-bg) | #ffffff | Cards, panels, modals |
bg-(--theme-secondary-bg) | #e8e5d8 | Chips, subtle backgrounds |
border-(--theme-border) | rgba(136,176,75,0.15) | All borders |
text-primary / bg-primary | #88b04b | Brand green (actions, highlights) |
bg-(--theme-error-bg) + border-(--theme-error-border) + text-(--theme-error) | red scale | Error states |
bg-(--theme-success-bg) + border-(--theme-success-border) + text-(--theme-success) | green scale | Success states |
bg-(--theme-warning-bg) + border-(--theme-warning-border) + text-(--theme-warning) | amber scale | Warning states |
bg-(--theme-info-bg) + border-(--theme-info-border) + text-(--theme-info) | blue scale | Informational states |
bg-(--theme-danger-bg) + border-(--theme-danger-border) + text-(--theme-danger) | red scale | Danger / destructive actions |
text-(--theme-text) opacity-60 — not text-gray-500 or text-gray-400.
Common Replacements
| Hardcoded class | Replace with |
|---|---|
bg-white | bg-(--theme-card-bg) |
text-gray-900, text-black | text-(--theme-text) |
text-gray-500, text-gray-400 | text-(--theme-text) opacity-60 |
bg-gray-100, bg-gray-50 | bg-(--theme-secondary-bg) |
border-gray-200 | border-(--theme-border) |
Page Structure
Every page in the app must include aNavbar at the top and a Footer at the bottom. Use an existing layout component (SellerLayout, OrdersLayout) or add both manually — no screen should be left without them.
- Content width: always
max-w-7xlfor full pages,max-w-2xlfor narrow forms or modals. Do not mix5xl,6xl, or4xl— mismatched widths make sections visually misaligned across the app. - Navbar and Footer: use
w-full px-4 sm:px-8 lg:px-12 xl:px-16with nomax-w— they sit full-width and hug the edges. Only the content inside is constrained tomax-w-7xl. - Body height:
min-h-screen flex flex-colon the root container ensures the footer is always pinned at the bottom; the main content area getsflex-1.
Typography
One font, one rule: Inter only. It is loaded once in
Layout.astro and set as the default font-family on body in global.css. You never need to import or specify it again.- Use
font-boldandfont-blackfor headings and titles — not a different typeface. font-displayis available and also resolves to Inter.- Do not use
font-['Outfit']orstyle={{ fontFamily: ... }}inline — these are legacy patterns that must be replaced withfont-display.
Navbar Rules
- Link text in Spanish: Productos, Órdenes, Inventario, Entregas, Admin.
- Active state: the current section’s link gets
text-primaryplus an underline. Comparewindow.location.pathnameagainst thehrefand setaria-current="page". - Unauthenticated state: show the “Iniciar sesión” button as a visible green pill with an icon — do not hide it in a dropdown.
- Root route:
/redirects to/productos; there is no welcome landing page. - No wrapping: keep
shrink-0on logo and action buttons,whitespace-nowrapon nav links, andtruncateon the username to prevent the navbar from breaking at wide viewports.
Brand Logo
The SansiStore logo is always composed of two elements:- A
ShoppingBagicon (fromlucide-react) inside a rounded green pill:rounded-xl bg-primary. - The text “SansiStore” in
font-black, with the word “Store” wrapped intext-primary.
src/components/Navbar.tsx.
Radii, Icons, and Libraries
| Concern | Rule |
|---|---|
| Card / panel corners | rounded-2xl |
| Pill / button corners | rounded-full |
| UI icons | lucide-react |
| Brand / social logos | react-icons |
| Component libraries | ❌ None — no shadcn, no MUI |
--theme-* tokens. Third-party component libraries are not used in this project.
Dark Mode
Dark mode is entirely automatic. Whenhtml[data-theme='dark'] is set, every --theme-* token flips to its dark value as defined in global.css. If you always use tokens you get dark mode for free — no dark: Tailwind variants needed.