Перейти к содержимому
14 дней бесплатно, без карты9 языков176 типов бизнеса · 50 приложений
RU· USD
Попробовать живое демоПопробовать бесплатно

Эта страница пока недоступна на выбранном языке (Русский), поэтому показана на английском.

Follow the theme in your own UI

Plugin pages and widgets pick up the active theme, light and dark mode and right-to-left layout automatically — if you use tokens.

  • about 6 min

Whatever theme a workspace chooses, your plugin's pages follow it when you use the design tokens instead of fixed colours. Light and dark themes come from the tokens.

PurposeUse
Texttext-fg, text-fg-muted, text-fg-subtle
Statustext-ok, text-warn, text-danger (plus text or an icon — never colour alone)
Surfaces and bordersbg-bg-soft, bg-bg-muted, border-line, cards with className="card"
Brandtext-brand, bg-brand-fill
Right-to-leftLogical utilities only: ms-, me-, ps-, pe-, text-start, text-end, start-0
A themed, RTL-safe card
export function VisitCard({ name, when, late }: { name: string; when: string; late: boolean }) {
  return (
    <div className="card p-4">
      <p className="font-semibold text-fg">{name}</p>
      <p className="text-sm text-fg-muted">{when}</p>
      {late ? <p className="mt-2 text-sm text-warn ps-2 border-s-2 border-line">Late — call the customer</p> : null}
    </div>
  );
}
  • Never hard-code colours (#ff0000, text-red-600) or physical sides (ml-, left-).
  • Every page must work at 360 px wide; tables scroll inside their container.
  • Admin pages are English; customer-facing plugin strings go through pluginT(id, locale) with messages/<locale>.json.

Written from: docs/PLUGIN-DEVELOPER-GUIDE.md, docs/BRAND.md, src/app/globals.css