Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

strict-theme-primer

/strict-theme-primer

Buduje strony kursów i narzędzi edukacyjnych w motywie Primer dla shadcn, z katalogiem, lekcją i postępem.

Repozytorium
strictthemes ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
8
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Buduje strony kursów i narzędzi edukacyjnych w motywie Primer dla shadcn, z katalogiem, lekcją i postępem.

Oryginalny opis (EN)

Build UI in the Primer theme from strictthemes.com. A bright, clear theme for courses, schools and learning tools. Cream paper, deep-teal ink, a blue action, and four chart colors. Use it when the project's DESIGN.md is Primer, or when the user asks for the Primer theme. It installs the theme into a shadcn project, gives its layout rules and its page briefs (course catalogue, course page, lesson page, progress page and plans page), and checks the result with Strict Check.

Jak działa

  1. Before you start
  2. The theme in short
  3. Rules
  4. Page briefs
  5. Check before you finish
Sekcje z nagłówków SKILL.md, w oryginale · 139 linii, 6 345 słów
Podgląd SKILL.md
---
name: strict-theme-primer
description: "Build UI in the Primer theme from strictthemes.com. A bright, clear theme for courses, schools and learning tools. Cream paper, deep-teal ink, a blue action, and four chart colors. Use it when the project's DESIGN.md is Primer, or when the user asks for the Primer theme. It installs the theme into a shadcn project, gives its layout rules and its page briefs (course catalogue, course page, lesson page, progress page and plans page), and checks the result with Strict Check."
---

# Primer

A bright, clear theme for courses, schools and learning tools. Cream paper, deep-teal ink, a blue action, and four chart colors.

This skill is for building UI in the Primer theme: a page, a section or a component. `DESIGN.md` decides the tokens: colors, type, spacing steps and corners. The notes below say how the theme lays a page out and which token goes where.

## Before you start

1. **Check the theme is installed.** The project should have `DESIGN.md` in its root and the Primer variables in its global CSS. If not, run `npx shadcn@latest add https://strictthemes.com/r/primer.json` and save https://strictthemes.com/themes/primer/DESIGN.md as `DESIGN.md` in the project root. In a project without shadcn, use https://strictthemes.com/themes/primer/tailwind.css instead. If the global CSS still imports a font the theme does not use (a new shadcn project imports Geist), remove that import, and uninstall its package if nothing else uses it. Keep every font import the theme's install added, also one for a style no page uses yet.
2. **Read `DESIGN.md` from start to finish.** It is the source of truth for every visual decision.
3. **Look at the project before writing code.** Use its framework, router and file layout. For controls (buttons, inputs, tabs, menus, dialogs, accordions, data tables) use the components in `components/ui`, and add a missing one with `npx shadcn@latest add <name>` rather than writing your own, unless the page brief names a plain element. Layout is plain elements with theme classes: sections, panels, figures and lists need no component.
4. **Teach `cn()` the theme's type classes.** shadcn's class merger does not know `text-display` or `text-h1`. It takes them for colors, so `cn("text-label text-muted-foreground")` silently drops one of the two, and a type class passed to a stock component does not replace its size. In a new shadcn project, `lib/utils.ts` only passes `cn` on from the `cn` package. Unless the file already holds the lines below, change it to:

   ```ts
   import { createCn } from "cn/config"

   // The theme's type classes are font sizes, not colors.
   export const cn = createCn({
     extend: {
       classGroups: {
         "font-size": [{ text: ["display", "h1", "h2", "body", "label"] }],
       },
     },
   })
   ```

   Then make every file in `components/ui` use it: where one has `import { cn } from "cn"`, change that line to import `cn` from the project's utils file (`@/lib/utils` in a default setup). Do the same for each component you add later. If the project uses `tailwind-merge` instead of the `cn` package, its components already import from the utils file: pass the same object to `extendTailwindMerge` and keep `clsx`.

## The theme in short

- **Fonts:** Lexend for headings, Plus Jakarta Sans for body text, Fira Code for labels and code.
- **Type scale** (size/weight; each class also sets line height and tracking): `text-display` 56px/700, `text-h1` 36px/700, `text-h2` 22px/600, `text-body` 16px/400, `text-label` 13px/500.
- **Font per size:** a type class does not set the font family. Headings (`<h1>` to `<h6>`) get the heading font on their own; on any other element add the font class: `font-heading` with `text-display`, `text-h1`, `text-h2`; `font-mono` with `text-label`.
- **Spacing scale**, with the Tailwind step in brackets: 4px (`1`), 8px (`2`), 12px (`3`), 20px (`5`), 32px (`8`), 80px (`20`).
- **Corners:** `rounded-sm` 6px, `rounded-md` 10px, `rounded-xl` 16px (the `lg` corner in `DESIGN.md`). `rounded-lg` is 10px as well: it is shadcn's name for the base corner, the one its stock buttons and inputs use.
- **Colors (light mode):** primary #095C78, on-primary #FFFFFF, secondary #FFD166, on-secondary #073B4C, tertiary #06D6A0, on-tertiary #073B4C, neutral #3E6270, background #FFFBF0, surface #FFFFFF, foreground #073B4C, border #E4DCC6, error #B3123F, azure #118AB2, sun #FFD166, berry #EF476F.

The layout notes below are written around a sample organisation and its pages. If the user gave you their own product, its name, pages and content replace the sample's, and the layout, the colors and the classes stay as the notes give them.

### How Primer pages are laid out

- **Page:** cream paper with white cards on it. The outermost element is a `<div>` with `flex min-h-svh flex-col bg-background text-body text-foreground`, holding the `<header>`, a `<main>` (`flex-1`) and the `<footer>`.
- **Container:** the header's row, the content of `<main>` and the footer's row each sit in a centered container `<div>`: `mx-auto w-full max-w-[1240px] px-5`, so the content is at most 1200px wide, as `DESIGN.md` gives the grid, with 20px at the page's edge at every width. This width is the one arbitrary value allowed.
- **Sample organisation:** "Rowlark", an invented online school that teaches practical data skills in three topics: spreadsheets, SQL and charts. It has nine courses, 102 lessons in all, and three teachers: Samir Okonjo (spreadsheets), Odile Brandt (SQL) and Lena Farrow (charts). The learner is Tessa Marlow. Prices are in US dollars. The same courses, lessons, lengths and prices appear on every page; the page brief gives the ones it needs.
- **Today:** the sample's today is Sunday, 14 March 2027, a fixed date in code, never the device's clock.
- **Dates and lengths:** a date is written day first with the month in full, `14 March 2027`, and the year only where the page brief shows it. A date that stands on its own (a small figure, a row of a list) is a `<time>` with a `dateTime` (`2027-03-14`); inside a sentence it is plain text. A length is hours and minutes with a space before each unit, `3 h 10 min`, and minutes alone under an hour, `16 min`. A count carries its noun: `12 lessons`.
- **Addresses:** the pages live at `/catalogue`, `/course`, `/lesson`, `/progress` and `/plans`. The school's name in the header links to `/catalogue`. A link whose destination the page brief does not name points to `#`.
- **Grid:** columns stand 32px apart and cards 20px, as `DESIGN.md` gives them. Where the page brief puts parts side by side, their wrapper is `grid grid-cols-1 gap-8 lg:grid-cols-12`, a single column below `lg`, and each item gets the `lg:col-span-*` the page brief gives it. A row of cards of the same kind is `grid grid-cols-1 gap-5` with the columns the page brief names. Items in one row stretch to the same height unless the page brief says otherwise.
- **Vertical rhythm:** written as gaps on stacks, never as top margins and never as `space-y-*`. Every element that holds more than one thing in a column is `flex flex-col` with one of these gaps: `gap-1` between a name and the small figure under it; `gap-2` between a heading and a small figure above or under it, between a field's label, the field, its helper text and its error, and between the items of a list of short lines; `gap-3` between a heading and its paragraph and between paragraphs; `gap-5` between the parts inside a card, between a section's heading and its content, and between cards; `gap-8` between the groups of a page and between columns; `gap-20` between sections, the 80px of `DESIGN.md`. A row of things side by side is `flex flex-wrap items-center` with `gap-3`, or `gap-2` for things that belong together (an icon and its word). The scale has no 16px and no 24px step: where a habit asks for one, use `gap-3` or `gap-5`. Where the page brief gives no gap, use the one that fits.
- **Main:** the container inside `<main>` is `flex flex-col` with `pt-8 pb-20` and the gap the page brief names: `gap-20` on a page made of sections (Catalogue, Course, Plans), `gap-8` on a page that is one piece of work (Lesson, Progress).
- **Header:** the first thing on the page is a `<header>` with `border-b border-border`, running the full width. Its container is also the row, `flex flex-wrap items-center gap-x-8 gap-y-1 py-3`: the school's name, "Rowlark", a link in `inline-flex h-10 items-center font-heading text-h2 text-foreground`; then the `<nav>`, the page's only one named "Main" (`aria-label`), with `w-full md:w-auto`. It holds a `<ul>` with `flex gap-5` of three links, in this order: "Courses" to `/catalogue`, "My progress" to `/progress`, "Plans" to `/plans`. Each link is `inline-flex h-10 items-center font-sans text-body font-semibold text-foreground underline-offset-8`: the current page's link has `aria-current="page"` and `underline decoration-2`; the others have `hover:underline`. Below `md` the nav takes a line of its own under the name; the three links fit on it at 375px, so there is no "Menu" button and the header has no state. The page brief says which link is current.
- **Footer:** a `<footer>` with `border-t border-border`, running the full width. Its container is also the row, `flex flex-wrap items-center justify-between gap-3 py-8`: the school's name in `font-heading text-h2`, as a `<p>`, and a small figure: `Rowlark · Practical data skills, one short lesson at a time · 2027`.
- **Breadcrumb:** where the page brief asks for one, it is a `<nav>` with the `aria-label` "Breadcrumb" holding an `<ol>` with `flex flex-wrap items-center gap-2`, in `font-mono text-label`: each step but the last a link in `text-muted-foreground underline underline-offset-4 hover:text-foreground`, a `/` in `text-muted-foreground` with `aria-hidden="true"` between steps, and the last step in `text-foreground` with `aria-current="page"`, not a link. Because the breadcrumb then says `page`, the header's "Courses" link has `aria-current="true"` in place of `page`, with the same look.
- **Headings:** Lexend, sentence case, no full stop, at the weight its type class sets: do not add a weight class to a heading. The `<h1>` is `text-h1`; it is `text-display` only where the page brief says so, and then only from `md` up (`text-h1 md:text-display`). An `<h2>` is `text-h2`. An `<h3>` is `text-h2` too, unless the page brief gives it another size. A small heading inside a card that the page brief calls a name is `font-sans text-body font-semibold`: body text at weight 600, not the heading font. Headings get the heading font on their own; any other element in `text-display`, `text-h1` or `text-h2` adds `font-heading`.
- **Sections:** where the page brief calls something a section, it is a `<section>` with `aria-labelledby` pointing at its heading, `flex flex-col gap-5`, with the heading (or a heading row) first and the content after it. Without a visible heading it gets an `aria-label`, and where it then holds one element it has no stack classes. Where a card is the section, the card carries `<section>`, and its own `gap-5` is the section's. A heading row is `flex flex-wrap items-end justify-between gap-3`: the heading on the left, and on the right what belongs to the whole section, a small figure or a control. The header, the footer and a page's opening are not sections.
- **Labels:** Fira Code sets what is counted, measured or typed: levels, lengths, counts, scores, percentages, dates, code, and also field labels, table headers, breadcrumbs, badge text and captions. A label is `font-mono text-label`, in sentence case, never `uppercase`, a short fragment. Buttons and nav links are not labels: they are in the body font.
- **Small figures:** a length, a count, a date, a percentage or a short note that the page brief calls a small figure is `font-mono text-label tabular-nums text-muted-foreground`. The classes go on the element that holds the whole figure: a `<p>` where it stands on a line of its own, a `<span>` inside a row or a line, unless the page brief names the element. Parts of one figure are joined with ` · `. A `text-foreground` in the page brief replaces the muted color: write the two through `cn`, so that one replaces the other. A small figure with an icon is `inline-flex items-center gap-2` with the icon first.
- **Key figures:** the one number a card is about (a count, a price) is `font-heading text-display tabular-nums`, with its unit beside it as a small figure, in a row with `flex flex-wrap items-baseline gap-2`: a `<p>` holding the number and the unit as two `<span>`s, unless the page brief names the elements. Where the page brief asks for a smaller one, it is `font-heading text-h1 tabular-nums`.
- **Text color:** headings, body text, names, key figures and the figures of a chart are `text-foreground`. Labels, small figures and helper text are `text-muted-foreground`, and only on the page or a card, never on a fill. Paragraphs are never muted.
- **Writing:** address the reader as "you", in short, plain sentences, the way a patient teacher talks. No exclamation marks.
- **Measure:** a paragraph of body text is at most `max-w-2xl` wide.
- **Links:** a text link is the text color, underlined: `text-foreground underline underline-offset-4 hover:decoration-2`, and it inherits its size. A link that is a card's or a row's title has no underline until hover: `text-foreground underline-offset-4 hover:underline`. The class lists in these notes and in the page brief leave out the focus outline: add the outline classes from the rules to every link and to every other element you write that takes focus.
- **Buttons:** the shadcn `Button` with `className="h-10 px-5 font-sans text-body font-semibold"`: the body font at weight 600, in sentence case, two to four words. The stock `Button` ships a smaller size and `font-medium`; these classes replace both, and its stock corner (`rounded-lg`, 10px) stays. The default variant is for the one main action of a view, deep blue with white text, yellow with ink text in dark mode: no view shows two. Every other button is `variant="secondary"`, yellow with ink text, a lighter blue with white text in dark mode. `variant="outline"` is only for the buttons of a button group that are not chosen. No `ghost`, `link` or `destructive` buttons. In `components/ui/button.tsx`, once, on every page: in the `secondary` variant, replace `hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]` with `hover:bg-secondary/80` (the stock hover cannot be told from the resting color); on a page with a button group, in the `outline` variant, replace `bg-background` with `bg-card` and take out `dark:bg-input/30`, so the button is the card's white on the cream page, its hover classes unchanged. A button that sends a form needs `type="submit"`: this `Button` is `type="button"` unless told otherwise. No button on these pages is ever disabled, so none gets `focusableWhenDisabled`, and `button.tsx` needs no `data-disabled:` classes. A call to action that goes to another page is an `<a>` with the same classes: write `cn(buttonVariants({ variant }), "h-10 px-5 font-sans text-body font-semibold")`, because `buttonVariants` alone does not merge classes. An icon in a button is `size-4` with `aria-hidden="true"` and no `data-icon`, so the button keeps its `px-5`, and sits where the page brief puts it.
- **Button groups:** a set of buttons where one is chosen (a level, a week) is a `<div>` with `role="group"`, `flex flex-wrap gap-2` and an `aria-label`. The chosen button has `aria-pressed="true"` and `variant="secondary"`; the rest have `aria-pressed="false"` and `variant="outline"`. Not `Tabs`: there are no tab panels. Pressing one moves no focus.
- **Inputs:** the shadcn `Input` with `className="h-10 px-3 text-body md:text-body"`, its stock corner. In `components/ui/input.tsx`, replace the class `bg-transparent` and the class `dark:bg-input/30` with `bg-card`, so a field is white on the cream page in light mode and the card's color in dark mode; `file:bg-transparent` and the `disabled:` fills stay. A field is a `flex flex-col gap-2`: a visible `<label>` with `block`, a label in `text-muted-foreground`, tied to the field with `htmlFor`; then the field; then any helper text, a small figure that the field names in `aria-describedby`.
- **Errors:** an error is one line under what it is about: `flex items-start gap-2 font-mono text-label text-destructive`, holding the `CircleAlert` icon (`size-4 shrink-0`, `aria-hidden="true"`) and one sentence that says what to do. A field gets `aria-invalid` and names the line's `id` in its `aria-describedby`; a `RadioGroup` names the line in its `aria-describedby` and takes `aria-invalid` too, as the Forms rule says. A form is checked in code on submit, with `noValidate` on the `<form>`. The error line is removed when its control changes. The error color is for this line only: a wrong answer to a question is not an error and is told in words in the text color.
- **Confirmations:** a message that appears or changes after an action goes into an element with `role="status"` that is on the page from the start: one that arrives with its text is often not announced. Where it starts empty it is never hidden, has no classes that draw or take space, and is never an item of a `gap-*` stack or row: it shares a plain `<div>` with the element above it, and the message inside it, rendered only while there is one, carries the look and the space, such as `mt-5`. A status element that always holds text (a count of results) may be an item of a stack like any other.
- **Cards:** a card is a plain element with `rounded-xl border border-border bg-card p-5` (16px corners, 20px padding, a 1px border, no shadow), and `flex flex-col gap-5` inside unless the page brief says otherwise. Not the shadcn `Card`, which ships its own padding and a ring. Never put a card inside a card, and never a bordered box inside a card: divide a card's parts with 1px rules, `border-t border-border` with `pt-5`.
- **Rows with rules:** a list whose rows are divided by rules (lessons, a legend, recent activity) is a `<ul>` or an `<ol>` with `flex flex-col` and no gap. Each row has `py-3 first:pt-0 last:pb-0 border-border not-first:border-t`: a rule above every row but the first.
- **Badges:** the shadcn `Badge` (`npx shadcn@latest add badge`) with `className="h-auto rounded-sm border-transparent bg-tertiary px-2 py-1 font-mono text-label text-tertiary-foreground"`: green with ink text in both modes, one or two words, no icon. The corner must be in this `className`, or the stock pill wins. There is one kind of badge. Green is a fill only: never write `text-tertiary`.
- **Chart colors:** four fills, the same in both modes, used in this order: `bg-azure`, `bg-tertiary` (green), `bg-sun` (yellow), `bg-berry`. A chart with one series is azure; a chart with more takes them in this order. Never `bg-secondary`, `bg-primary` or a `chart-*` class in a chart: `bg-secondary` and `bg-primary` change with the mode, and the yellow of a chart is always `bg-sun`. Each topic keeps one color on every page: Spreadsheets azure, SQL green, Charts berry. Sun is for the time spent on practice files, which belongs to no topic. No text is ever set on azure, sun or berry, and no chart color is a text color. Sun is a pale fill on a white card, so, as with every chart color, it is never the only way to read something: the word or the figure is always beside it.
- **Topic marks and legend dots:** a topic is shown as `inline-flex items-center gap-2`: a dot, `size-2 shrink-0 rounded-full` with the topic's fill and `aria-hidden="true"`, then the topic's name, a label in `text-muted-foreground` unless the page brief gives another style. The same dot is the dot of a chart's legend.
- **Progress bars:** a row, `flex items-center gap-3`: a track, `h-2 min-w-0 flex-1 overflow-hidden rounded-full bg-border`, holding a fill, `h-full rounded-full bg-tertiary`, whose width is a percentage in an inline `style`; then the percentage, `25%`, as a small figure in `text-foreground` with `w-10 shrink-0 text-right`. At 0% there is no fill. The track has `aria-hidden="true"`, which hides the fill too; the percentage beside it and the count the page brief puts near it (`3 of 12 lessons done`) say the same in words. Percentages are whole numbers.
- **Charts:** drawn with plain elements, flat: a bar is a `<div>` with one fill, square corners and no border, whose height or width is a percentage in an inline `style`, worked out in code from the data. Every bar has its figure written beside or above it in `font-mono text-label tabular-nums text-foreground`. Grid lines are 1px `border-border`; axis values are small figures. A chart's drawing has `aria-hidden="true"` and the text alternative the page brief names.
- **Avatars:** a circle with a person's initials: `flex size-10 shrink-0 items-center justify-center rounded-full bg-secondary font-mono text-label text-secondary-foreground`, with `aria-hidden="true"`, beside the written name. Where the page brief asks for a larger one it is `size-12`, never more.
- **Lesson rows:** a lesson in a list has its number, its title and its length. The title is `text-body` and the length a small figure; the number is a small figure in a column of its own, or leads the title in the title's own style (`4. Filtering rows with WHERE`), as the page brief says. Where a lesson has a state (done, next, locked), the state is an icon and a word, never a color.
- **Accordions:** the shadcn `Accordion` (`npx shadcn@latest add accordion`), inside a card that has `px-5 py-0` in place of the card's padding and no stack classes, so each trigger's own padding is the card's. The stock `Accordion` is off the type scale. In `components/ui/accordion.tsx`: on the trigger, replace `items-start` with `items-center`, its stock vertical padding with `py-3`, and its small text size and `font-medium` with `font-sans text-body font-semibold`, and add `min-h-10 gap-3`; on the content, replace the small text size with `text-body`; on the content's inner element, replace the stock bottom padding with `pb-5` (`pt-0` stays) and delete the class that starts with `[&_p:not(:last-child)]`, which gives paragraphs a bottom margin off the scale. The items keep the stock 1px rule between them. Each trigger sits in an `<h3>` that the component renders, so an accordion always follows an `<h2>`. Give each `AccordionItem` a `value`.
- **Icons:** from `lucide-react`, with `size-4` (`size-5` where the page brief says so) and the stroke they ship with, 2px with round caps: do not set `strokeWidth`. An icon beside a word has `aria-hidden="true"`. Beside a line of body text in an `items-start` row, the icon sits on the first line: `mt-1` for a `size-4` icon, `mt-0.5` for a `size-5` one. Only where named. Never an emoji.
- **Corners:** `rounded-sm` (6px) for badges and the stacked bar of a chart; `rounded-lg` (10px, what buttons and inputs ship with) for buttons, inputs and a code block; `rounded-xl` (16px) for cards; `rounded-full` only for avatars, progress bars, legend dots, the stock `Switch` and a radio button, none of them over 48px. A chart's bars have square corners.
- **Surfaces:** flat. No shadows, blur or gradients in the code you write.
- **Motion:** in the code you write, the only transition is color: `transition-colors duration-150` on a link whose color changes on hover, which on these pages is a breadcrumb's link; a link that only gains an underline or a thicker one gets none. A progress bar does not animate, and nothing moves on scroll. Stock components keep the motion they ship with, and so does a link written with `buttonVariants`.

## Rules

- **Colors:** only the theme's colors, through the semantic classes (`bg-background`, `text-foreground`, `bg-card`, `bg-primary`, `text-primary-foreground`, `text-muted-foreground`, `border-border` and so on). No hex, rgb or named colors in components, and no Tailwind palette classes such as `bg-blue-500` or `text-gray-600`.
- **Spacing:** padding, margin and gap use only the scale's steps (`1`, `2`, `3`, `5`, `8`, `20`) plus 0, 1px and 2px. No arbitrary values such as `p-[18px]`, and no other steps such as `p-6` or `gap-10`. `auto` margins are fine. Widths and heights such as `w-64` or `size-4` are sizes, not spacing. This applies to the code you write: a stock component keeps the spacing inside it, unless the page brief changes it. That includes the stock `gap-1.5` between a `Button`'s icon and its words: leave it, and add no gap class to the button.
- **Type:** every piece of text you write gets its size from one of `text-display`, `text-h1`, `text-h2`, `text-body`, `text-label`, set on the element or on a parent it inherits from. Put `text-body` on the outermost element of the page you write. No other sizes. A stock shadcn component keeps the size it ships with, unless `DESIGN.md` or the page brief gives that component its own style. A type class does not replace a weight class: where a stock component ships `font-medium` and the text should be regular, add `font-normal`. Text that `uppercase` sets in capitals is written in normal case in the code, also where the page brief shows it in capitals, so a screen reader does not spell it out.
- **Fonts:** only the theme's fonts, through `font-sans`, `font-heading` and `font-mono`. Do not add a font.
- **Corners:** only the `rounded-*` classes, which the theme already sets. No arbitrary radius in the code you write; a stock component's own corner classes stay. `rounded-full` only where `DESIGN.md` or the page brief names a full round, such as an avatar or a status dot. The theme allows a full round on a box up to 56px across, not larger, and a pill counts by its height.
- **Contrast:** all text meets WCAG AA against its background.
- **Stock components:** a component from `components/ui`, and an `<a>` styled with `buttonVariants`, keeps the hover, pressed and disabled colors and the motion it ships with, unless the page brief changes them, also where the layout notes give links a transition. They are the theme's colors under other names. The same holds for every other stock class that neither the notes nor the page brief name, also in a file you edit: it stays. Examples are `TableHead`'s `h-10`, `font-medium` and `whitespace-nowrap`, a `Badge`'s `gap-1` and `whitespace-nowrap`, and the `group-has-[:focus-visible]/field-label:` classes, which only act inside a shadcn `Field`. A `Button` that a stock component renders inside itself, such as the `CalendarDayButton`'s `size="icon"`, keeps its variant and size: what the notes say about button sizes is for buttons you write. Classes the notes give a stock component go in its `className` where you use it, unless they say to change its file. `TableCell`'s stock `p-2` then stays beside the `px-*` and `py-*` you pass, which is fine: those win.
- **Link transitions:** where the layout notes give every link a transition, that includes a link whose color does not change on hover, such as the name in the header: there the class does nothing, which is fine.
- **Forms:** a typed value is trimmed at both ends before it is checked and before the page shows it back (in a confirmation, a list or a summary), so a field of spaces is empty. The field itself keeps what was typed. A field's error line comes after its helper text, and its `aria-describedby` names the helper text first. A group of choices with an error (radios, checkboxes, toggle buttons) names its error line in its own `aria-describedby`, unless the page brief ties the error line to each control in it. A group that only holds fields does not: each field names its own. A radio group takes `aria-invalid` on its `RadioGroup` and a set of checkboxes on each `Checkbox`. A `<fieldset>` and a `role="group"` do not take it, so a group of toggle buttons has none.
- **Long words:** every email address and URL, the page's own included, and any name the visitor typed that the page shows back, gets `wrap-break-word` on its element or on the paragraph that holds it. One long word can run out of its box or push it wider, also in a narrow column on a wide screen. A flex item, and an item of a grid with no `grid-cols-*` class at that width, is never narrower than its longest word or its widest scroll box, so neither the class nor a scroll box keeps it in: give such an item `min-w-0`, or give the grid `grid-cols-1` below its breakpoint (`grid grid-cols-1 md:grid-cols-12`).
- **Grid columns:** an item placed in "columns 9–12" gets a span and a start at the grid's breakpoint (`md:col-span-4 md:col-start-9` where it is `md`). Write the start whenever the item does not begin right after the one before it.
- **Lists:** a list "with no markers and no padding" needs no class for it: Tailwind's base styles already remove both.
- **Dates and figures:** where the layout notes and the page brief leave a case open, a `<time>` wraps only the date or the time, not the words around it. A date or a time inside a sentence then gets no `<time>`, and nor does a copyright year. That is about the element only: whether the figure takes `tabular-nums` is a separate question. Where they leave open whether a figure in a label line, a row or a table cell takes `tabular-nums`, add it: it changes only the width of digits. Figures in running text need none. Where they ask for it but not on which element, put it on the element that holds the whole figure or label line, so that it covers every figure in it; a `<time>` inside inherits it. For a time inside a sentence, that is the `<time>` itself, not the paragraph.
- **Menus on small screens:** where the layout notes put the nav links behind a "Menu" button that opens a second `<nav>` in the header, the button is hidden from the notes' breakpoint up (`md:hidden` for `md`). Escape closes the menu while focus is on the button or in the menu, through one `onKeyDown` on the `<header>` that acts only while the menu is open, and focus then goes to the button. The second `<nav>` marks the current page's link the way the row does. It shares the row's `aria-label`, which is right, because one of the two is always hidden.
- **Counts:** a number with a noun reads right at one: "1 set", not "1 sets". Where the page brief gives the words for only one of the two, write the other the same way.
- **Sizes from data:** a height or a width that comes from data (a chart bar, a meter) is set with an inline `style`. That is the one use for an inline style.
- **Focus:** every link and control shows a 2px outline on keyboard focus: `focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`. Where a class list that the layout notes or the page brief spell out for a link, a nav link or a table's scroll box lacks them, add them to it. Keep `focus-visible:outline-solid` in it: in Tailwind 4 an `outline-none` on the same element, which stock components carry, otherwise hides the outline. An element that only gets focus from code (a heading or a message with `tabIndex={-1}`) gets the same outline written with `focus:` in place of `focus-visible:` (`focus:outline-solid focus:outline-2 focus:outline-offset-2 focus:outline-ring`): after a mouse click, a browser does not match `:focus-visible` on an element that code focuses. A link, a button or a field that code focuses keeps the `focus-visible:` classes it has: after a mouse click it shows no outline, which is how a browser treats every control, and is right. A stock component that ships its own focus ring (`Button`, `buttonVariants`, `Input`, `Textarea`, `Checkbox`, `Switch`, `RadioGroupItem`, `SelectTrigger`, the day buttons of a `Calendar`, `AccordionTrigger`, the close button of a `Sheet`) must lose that ring. Do it once, in the component's file in `components/ui`, which is yours to change: replace its `focus-visible:ring-*` classes with the outline classes, and in a field (an `Input`, a `Textarea`, a `SelectTrigger`, a `Checkbox`, a `Switch` or a `RadioGroupItem`) replace its `aria-invalid:ring-*` classes, the `dark:` ones included, with `aria-invalid:ring-0`, or a field with an error shows a tinted ring. `Button` has two more sets. Its base classes also carry `aria-invalid:ring-*` classes, the `dark:` one included: replace them with one `aria-invalid:ring-0`, as in a field. Its `aria-invalid:border-destructive` and `dark:aria-invalid:border-destructive/50` are borders and stay: what the notes say about a field's border classes is for fields. Its `destructive` variant carries `focus-visible:ring-*` classes of its own, the `dark:` one included: delete them and put nothing in their place, because the base classes already give every variant the outline. That variant's `focus-visible:border-destructive/40` is a border and stays. Wherever this rule says replace, change the classes in the file and do not add `ring-0` beside them: an added class only wins where it comes later and passes through `cn`. The stock `focus-visible:border-ring` can stay. These ring changes go only into the files of components that this page uses and that can take focus on it: a `Badge` that is not a link keeps its ring classes. So does `button.tsx` on a page with no `Button` and no `buttonVariants` link. Its other edits still follow the notes: a hover change they make "on every page" is made here too, and the `cn` import from the setup steps goes into every file. A box that scrolls sideways (a code block, a wide table) gets `tabIndex={0}`, `role="region"`, an `aria-label` and the same outline, also at widths where it happens to fit. Where a focusable box touches the edges of a parent that has `overflow-hidden`, draw its outline inside it: `focus-visible:-outline-offset-2` in place of `focus-visible:outline-offset-2`.
- **Controls:** no control keeps the browser's own look, at rest or open. A choice from a list is the project's `Select`, never a native `<select>`, whose arrow and open list the browser draws. A date is picked from the project's `Calendar` in a `Popover`, never an `<input type="date">`. A checkbox, a radio button and a switch are the project's `Checkbox`, `RadioGroup` and `Switch`, never a bare `<input>`. Add a missing one with `npx shadcn@latest add <name>`. The theme's layout notes say how it styles each one. For one they do not cover, make it match the theme's `Input`: the same height, corner, border, fill, text size and focus outline, with its icon as far from the right edge as the text is from the left, and a popup on the theme's surface with a 1px `border-border`, the theme's corner and text in the type scale. Leave no stock text size, glow ring or translucent ring on it. Every `Textarea` gets `resize-none` as well as the classes the notes give it, so the browser draws no grip in its corner. The stock one grows with its text (`field-sizing-content`), and one the page brief sizes (`field-sizing-fixed` with `rows`) keeps that size. A field that searches or filters is an `Input` with `type="search"`, which tells a screen reader it is a search box. It also gets `[&::-webkit-search-cancel-button]:appearance-none`, which hides the clear button a browser draws in it. A `Select` takes its name from its visible label in two ways: the `<label>` has the `SelectTrigger`'s `id` as its `htmlFor` (the trigger is a `<button>`, so a click on the label reaches it), and the trigger has `aria-labelledby` with the label's `id`. Base UI links only its own `Select.Label`, which `select.tsx` does not wrap (its `SelectLabel` heads a group in the open list). A date field you write as a component takes a `ref` and passes it to its trigger, so code can focus it. The stock `CalendarDayButton` makes a `ref` and never attaches it, so add `ref={ref}` to its `<Button>`, or the arrow keys move nothing. End its classes with a `dark:data-[selected-single=true]:hover:` copy of the chosen day's fill and text classes (`dark:data-[selected-single=true]:hover:bg-primary dark:data-[selected-single=true]:hover:text-primary-foreground` for the stock ones): a `hover:` class loses to the chosen day's stock `data-[selected-single=true]:` classes, but a `dark:hover:` one beats them.
- **Not allowed:** purple or multi-color gradients; emoji used as icons or bullets; glows and colored shadows.
- **Avoid:** a card inside a card.
- **Dark mode:** the page must work with the `dark` class on `<html>`. Because every color comes from a semantic class, this needs no extra code; do not write `dark:` color overrides. A new shadcn project follows the system's mode and switches on the `d` key: leave that as it is, and add no mode switch of your own.

From the theme's own do's and don'ts:

- Do write the figure beside every bar and every progress bar: color alone says nothing.
- Do keep one main action in view: the next lesson, the next question.
- Do tell a learner where they are: lesson 4 of 12, 35 minutes left.
- Don't set text on azure, sun or berry, and don't use any chart color for text.
- Don't use more than the four chart colors, and don't use gradients or glows.
- Don't put a card inside a card.
- Don't introduce a color, size or radius that is not a token above.

## Page briefs

Primer has a full brief for each of these pages: sections, layout, sample content and checks. When the user asks for one of them, fetch its brief and follow it. Where a brief and the notes above differ, the brief wins.

- **Catalogue:** the course catalogue of an online school, with a search field and a level filter that together change a grid of nine course cards, a count of results given in words, and an empty state. https://strictthemes.com/themes/primer/prompts/catalogue.md
- **Course:** one course of an online school, with an opening that has the title, the facts and one action to start, a drawn chart, what you will learn, the syllabus as modules that open and close with their lessons inside, the teacher, and a panel with the price and the action. https://strictthemes.com/themes/primer/prompts/course.md
- **Lesson:** one lesson of an online course, with where the learner is in the course and a progress bar, the lesson's text with one code sample, a question with four answers and a Check my answer button that answers in words, a link to the next lesson, and the module's lessons with their state. https://strictthemes.com/themes/primer/prompts/lesson.md
- **Progress:** a learner's progress at an online school, with a row of figures, a bar chart of minutes per day that switches between this week and last week, a chart of time by topic with a legend, progress bars for three courses and a list of recent activity. https://strictthemes.com/themes/primer/prompts/progress.md
- **Plans:** the plans and prices of an online school, with a switch between paying monthly and yearly that changes the prices, three plans with one marked, a table that compares what each includes, and questions and answers. https://strictthemes.com/themes/primer/prompts/plans.md

## Check before you finish

Build the project, then measure it against the theme with Strict Check:

```bash
npx @strictthemes/check --dist dist
```

`dist` is the folder the build wrote. Add `--path /pricing` for each page you touched other than `/`. Fix every error it lists by using a value the theme allows, and run it again until the last line starts with `Passed`. Do not mark code `strict-ignore` to get there.

Then tell the user what you built, what the check reported, and anything you could not verify.

Wersje

W bazie nie ma innych skilli o nazwie strict-theme-primer.

Migawka bazy z 13.11.2026 · wersja paczki 6bb3877407ae (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100strict-theme-strict-one
    Buduje strony w motywie Strict One dla shadcn, w stylu szwajcarskiej siatki, z jednym akcentem i pulpitem.
  • 100strict-theme-ledger
    Buduje strony finansowe i raporty w motywie Ledger dla shadcn, z dużymi liczbami i formularzem płatności.
  • 90feitio
    Buduje strony i komponenty w systemie projektowym Feitio, ręcznym i humanistycznym, w kremowo-atramentowej palecie z pomarańczą.
  • 85primer-premier-design
    Projektuje startery PCR w lokalnym Primer Premier 5 zgodnie z zapisanym workflow cDNA i aktualizuje raport w Excelu wraz z formatowaniem.
  • 10021st-design-sync
    Publikuje bieżący design projektu, na przykład zmienne shadcn i Tailwind, jako udostępniony motyw w społeczności 21st.dev.
  • 100widgettheme
    Stosuje motyw Morrow, czyli jasny styl gazetowy z kremowym tłem, czarnym tekstem i czerwonym akcentem.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.