Decorator Kit Developer Guide
Layouts, components, app patterns, and copy-ready prompts for building on Decorator 5.
A visual reference for building UC San Diego pages and apps with an AI
agent. Every example on this page is live Decorator 5 markup, and each one has a prompt
you can copy and adapt. Use the prompts on their own, or combine them into the app recipes
further down.
Built on ucsd-decorator-v5@5.0.4 ·
Bootstrap 3.3.7 as served from cdn.ucsd.edu · Markup sourced from
node_modules/ucsd-decorator-v5/dist/
Start here
The kit's rules already tell the agent to stay inside the canvas, read markup from the
npm package, and load the Decorator from the CDN. A good prompt adds the four decisions
the agent is not allowed to make for you:
- Template: which layout to start from. The agent will stop and ask
if you leave this out.
- File: the new page name. Say so if it should replace
index.html.
- Pieces: the modules and components to use, by name. The names
on this page match the reference files.
- Content: real headings, copy, links, and data, or say which
parts are placeholders.
Prompt template
Fill in the brackets. Delete any line you don't need.
Start from the Decorator [two-column.html] template and save it as [page-name.html] at the project root.
Site title: [Department name]. Navigation items: [Home, About, Services, Contact] — update the drawer, the navbar, and the side nav.
In the canvas, build:
1. [module or component name] — [what it says / does]
2. [module or component name] — [what it says / does]
3. [module or component name] — [what it says / does]
Images: [real paths + alt text, or "use placeholders at the module's documented size"].
Custom behavior goes in js/[name].js. Styles go in css/[name].css, scoped to main#main-content.
Don't use Bootstrap -success/-info/-warning/-danger classes. Keep every chrome region as shipped.
Layout templates
Four templates cover almost every page. The yellow dashed area is the canvas,
the only part the agent may edit. The blue bands are chrome: the header,
navbar, drawer, search, and footer. They look the same on every page.
Canvas (editable)
Chrome (do not edit)
blank-slate.html
Full-width canvas under the navbar. Best for apps, dashboards, and
single-purpose tools.
Header
Title band
Navbar + search
Footer
Use blank-slate.html. Copy it to [app.html] and rewrite its CSS and script paths to cdn.ucsd.edu. Replace only what's inside main#main-content with [describe the app].
two-column.html
Side navigation plus a wide content column. Best for department pages
and documentation. This guide uses it.
Header
Title band
Navbar + search
Footer
Use two-column.html. Save it as [about.html]. Keep pull-right on the main section and keep the DOM order as shipped. Side nav (article.main-content-nav) lists: [items]. Canvas content: [modules].
three-column.html
Left menu, wide middle column, and a right column for related links,
contacts, or alerts.
Header
Title band
Navbar + search
Footer
Use three-column.html. Save it as [resources.html]. Left menu: [items]. Middle: [content]. Right info column: a .msg.info note with [office hours] and a list of [related links].
homepage.html
Carousel hero and stacked callout modules. For a site's landing page.
Header
Title band
Navbar + search
Hero 1440 × 530
Callout modules
Footer
Use homepage.html as the new index.html (overwrite is OK). Hero: [3] slides at 1440 × 530 with headlines [..]. Below it, stack: callout content with 3 boxes, tiles with links, and news with images.
Brand basics
Decorator colors
These are the values the Decorator itself uses. Use them for your canvas CSS
instead of inventing new ones.
UC San Diego Blue#00629B · buttons, footer
Navy#182B49 · h2, text links, hovers
Gold#FFCD00 · .styled-yellow, alerts
Header#2B92B9 · .layout-header (chrome)
Active nav#004268 · navbar active item
Sand#F5F0E6 · .msg.info, div.styled
Source: dist/css/base.css, checked against the live
cdn.ucsd.edu stylesheet.
Typography
h1 and h2 get Teko SemiBold and a brand color (on the CDN build, h2 is navy). From
h3 down there's no brand styling unless the heading sits inside a
module wrapper, so put lower headings in a module.
h1h2div.styled.text-link
Live preview
The section headings on this page are h2. Body copy is Roboto. Inline links use the Decorator link
color.
Inside div.styled
A sand box that gives h3–h6 the brand blue. Use it
for asides and "on this page" boxes.
Use one h1 per page and h2 for each section. If a section needs h3 headings, put them inside a Decorator module wrapper or a div.styled box. Don't restyle the headings. Fonts are Roboto and Teko only.
Components
Bootstrap 3 loads on every Decorator page, but the Decorator only restyles some of it.
The components below are the on-brand ones. Anything that paints a color and isn't
styled in base.css renders in stock Bootstrap blue, green, or red. See
Guardrails.
The Decorator restyles -primary and -default. For a gold
call to action, use .styled-yellow.
.btn.btn-primary.btn.btn-default.btn.styled-yellow.btn-block
Add a primary action button "[Apply now]" (btn btn-primary) and a secondary "[Learn more]" (btn btn-default), using the markup in kitchen-sink/buttons.html. Use a <button> for actions and an <a> for navigation. No btn-success/-info/-warning/-danger.
Source: dist/kitchen-sink/buttons.html
Messages and alerts
Use the Decorator's own message boxes, not Bootstrap's alert-info
family. .msg.alert is gold with a warning icon and
.msg.info is sand with an info icon.
.msg.alert.msg.info
Live preview
Alert
Registration closes Friday at 5 p.m.
Note
Office hours are Monday–Thursday, 9 a.m.–4 p.m.
Show a deadline warning using the Decorator .msg.alert box (from kitchen-sink/alerts.html, "Legacy Alert Styles"), with heading "[Alert]" and text "[..]". Use .msg.info for neutral notes. Don't use Bootstrap alert-info/-success/-warning/-danger.
Source: dist/kitchen-sink/alerts.html, "Legacy Alert Styles"
Breadcrumbs
Every template puts one at the top of the canvas. Point each link at a real page.
ol.breadcrumb.breadcrumbs-listli.active
Set the breadcrumb to Home › [Section] › [This page]. Resolve each href relative to this page's own folder.
Stock Bootstrap 3 form markup. The Decorator restyles .form-control.
Every input gets a <label for> and a standard
autocomplete value.
.form-group.form-control.checkbox.help-block
Build a [contact] form using the Bootstrap 3 markup in kitchen-sink/forms.html (basic example). Fields: [name, email, topic select, message textarea]. Bind each label with for/id, use standard autocomplete values, no autofocus. Show validation errors above the form in a .msg.alert box. Put the submit logic in js/[form-name].js.
Source: dist/kitchen-sink/forms.html, "Basic example"
For a search or filter box inside your app. It isn't the site search, which is
chrome.
.input-group.input-group-btn
Add a filter box above the [course list] using the "Button addons" input group from kitchen-sink/input_groups.html, with an .sr-only label. Scope any CSS to main#main-content so it can't reach the site search. Filtering logic goes in js/[filter].js.
Source: dist/kitchen-sink/input_groups.html, "Button addons"
Tables
The Decorator styles table.styled (gray header) and
table.styled-dark (blue header). Mark alternate rows with
tr.even. Wrap wide tables in .table-responsive.
table.styled-darktable.styledtr.even.table-responsive
Live preview
Open service requests
| Ticket | Requester | Status |
| RQ-1042 | Facilities | In progress |
| RQ-1043 | Registrar | Waiting on requester |
| RQ-1044 | Library | Closed |
Render [data] as a table.styled-dark inside .table-responsive, with a <caption>, th scope="col", and tr.even on alternate rows. Show status as text, not color alone. If it needs sorting or paging, use the DataTables widget instead (see Widgets).
Source: dist/css/base.css, "table" section
Drawer (accordion)
Expandable sections for FAQs and long lists. base.min.js handles the
expand and collapse, so you write no JavaScript.
.drawer-wrapper.drawerh2 > a
Live preview
Any current faculty, staff, or student with an active UC San Diego
account.
Most requests are reviewed within three business days.
Add an FAQ using the drawer module (.drawer-wrapper > .drawer, from the Text and Headline module in templates/modules.html). Questions: [..]. Keep the h2 > a / div pairs exactly as shipped, and don't add accordion JavaScript — base.min.js already handles it.
Source: dist/templates/modules.html and dist/kitchen-sink/javascript_components.html, "Drawers"
Grid, helpers, and Glyphicons
Colorless Bootstrap layout and utility classes are safe anywhere in the canvas.
Icons are Glyphicons. Font Awesome isn't part of the Decorator.
.row.col-sm-*.col-md-*.img-responsive.sr-only.text-center.list-unstyled.glyphicon
Lay out [three feature blurbs] in a Bootstrap 3 .row with .col-sm-4 columns. Use Glyphicons with aria-hidden="true" next to visible text. No Font Awesome.
Source: dist/kitchen-sink/icons.html, helper_classes.html
Modules
Modules are the Decorator's page building blocks. Copy each module's wrapper, grid, and
classes exactly, and change only the text, image src/alt, and
link href. Each one is designed for a single image size; images at other
sizes get cropped.
Full-width text and CTA
A headline, a short paragraph, and one button on a textured band.
.jumbotron.jumbotron-full-width.side-image-white.bubbles
Live preview
Research Computing Help
Get storage, compute time, and one-on-one consulting for your lab's
research projects.
Request support
Add the full-width text and CTA module (jumbotron jumbotron-full-width side-image-white bubbles) from templates/two-column.html. Headline: "[..]". Blurb: "[..]". Button: "[..]" linking to [url].
Call to action with image
Text on one side and an image on the other. Flip the column order to put the image
on the left. Image size: 550 × 370.
.jumbotron.side-image-white.col-md-6figure > img.img-responsive
Live preview
Who We Are
Our staff supports faculty, students, and partners with timely,
innovative services. Meet the team behind every program.
Meet the staff
Add a "Text and CTA w/Full Height Image Right" module from templates/modules.html. Headline "[..]" (about 25 characters per line, 2 lines max), blurb of about 100 words, button "[..]". Image: [path], 550 × 370, alt "[..]". No text in the image.
Call to action, sand style
The same layout on the Decorator's sand background, with the image on the left.
Image size: 550 × 370.
.jumbotron.jumbotron-sand
Live preview
Faculty Mentoring
Pair with a faculty mentor in your field for a quarter of guided
research and career advice.
Find a mentor
Add the "Dark Background Text and CTA" module (jumbotron jumbotron-sand) from templates/modules.html, with the image on the left. Headline "[..]", blurb "[..]", button "[..]". Image: [path] at 550 × 370 with alt text.
Callout content, one box
One centered panel over a preset background. The class supplies the image, so don't
add your own.
.jumbotron-callout-content-one.navy-yellow.panel.panel-primary.panel-text
Live preview
Our History
Since its founding, the program has grown
into one of the campus's largest interdisciplinary centers,
connecting research, teaching, and public service.
See our timeline
Add Callout Content One (jumbotron side-image-white jumbotron-callout-content-one navy-yellow) from templates/two-column.html. Use the class background (don't supply an image). Panel heading "[..]", text "[..]", button .styled-yellow "[..]".
Callout content, two to four boxes
Semi-transparent blue panels on a background. Use the .jumbotron-orbs-1
preset texture, or a custom image at 1200 × 410
(1200 × 800 for four boxes or longer copy).
.jumbotron-callout-content-two.jumbotron-orbs-1.cta-two-three.text-indent
Live preview
New Students
Orientation dates, advising, and your
first-quarter checklist.
Start here
Transfer Students
Credit evaluation, major prep, and
transfer-specific events.
Transfer guide
Add "Callout Content with [2|3|4] boxes" from templates/modules.html with the jumbotron-orbs-1 preset background. Don't carry over the inline style="" background or min-height from the demo. Section headline "[..]". Boxes: [title / one-sentence blurb / text-link] × [n].
Tiles with links
Image tiles with white link text. The images are shaded automatically. Image size:
550 × 370, cropped to 200px tall, so keep the subject centered.
.jumbotron.jumbotron-tile-links.flex.wrapperimg.background-image
Add a tiles-with-links module. Take the flex/wrapper markup from the "Callout Content Blocks" block in templates/modules.html, but change the wrapper class from jumbotron-cta-blocks to jumbotron-tile-links, since the demo class isn't styled. Give every img.background-image an alt attribute (alt="" if the link text says it all). Tiles: [label → url] × [n]. Images at 550 × 370.
News with images
Three linked cards with date and headline. All three images must be
388 × 246. The CMS also has an auto-populated version driven by
a feed. Its endpoint URL is the only value you should change.
.jumbotron.jumbotron-gray.jumbotron-newsa.panel.panel-default.panel-news-date.panel-news-title
Add the "News with Images" module from templates/modules.html. Three items: [date / headline / url / image path + alt]. All images 388 × 246. Keep the a.panel.panel-default card structure, and remove the invalid alt attribute the demo puts on the <a> tags.
Event listing
A stacked list of events with an image, a linked title, and the date and time.
.event-listing.date-time.col-md-3 + .col-md-9
Live preview
October 3 from 10 a.m.–2 p.m.
Tour the labs, meet faculty, and learn about graduate programs.
Add the "Multiple Listings" event module from templates/modules.html (section.jumbotron > .container > .event-listing, one per event). Events: [title / url / date-time text / blurb / image + alt]. For a calendar view instead, use the FullCalendar widget.
Image sizes at a glance
The sizes the campus CMS publishes for each module. Every image in the same module
uses the same size.
Module image sizes
| Module | Size (px) |
| Hero — homepage | 1440 × 530 |
| Intro banner — article | 1500 × 480 |
| Image rotator | 900 × 335 |
| Call to action / Tiles with links | 550 × 370 |
| Call to action — inset | 1200 × 388 |
| Callout content / Text block | 1200 × 410 (taller: 1200 × 800) |
| News with images | 388 × 246 |
| Profile photo | 198 × 231 |
App recipes
Recipes combine the pieces above into complete pages. Each numbered list is the canvas
from top to bottom. Copy the prompt and replace the placeholders with your own content.
Department landing page
Template: homepage.html
- Hero carousel with 3 slides at 1440 × 530
- Callout content with 3 boxes (Students · Research · Give)
- Tiles with links for the main audiences
- News with images
- Event listing for the next three events
Build the landing page for [Department of X] from homepage.html, saved as index.html (overwrite is OK). Rewrite the asset paths to cdn.ucsd.edu.
Navigation (drawer + navbar): Home, About, Academics, Research, News, Contact.
Canvas, top to bottom:
1. Hero with 3 slides (1440 × 530): [headline + link] each.
2. Callout content with 3 boxes on the jumbotron-orbs-1 preset: Students, Research, Give — one sentence and a text-link each.
3. Tiles with links (jumbotron-tile-links, not jumbotron-cta-blocks): Faculty, Staff, Visit — 550 × 370 images with alt text.
4. News with images: 3 items at 388 × 246.
5. Event listing: next 3 events.
Use placeholder images at the right sizes where I haven't given one.
Template: two-column.html
- h1 and a short intro paragraph
- .msg.info with turnaround times
- Error summary area (.msg.alert, hidden until submit)
- Request form: name, email, department, type, details (MaxChar)
- Drawer FAQ
Create request.html from two-column.html for a [Facilities service request] app. Add "Request service" to the drawer, the navbar, and the side nav.
Canvas:
1. h1 "Request Service" and a one-paragraph intro.
2. A .msg.info box: "Most requests are reviewed within 3 business days."
3. An error summary container above the form that shows a .msg.alert listing each invalid field (with a link to it) after a failed submit.
4. A Bootstrap 3 form (kitchen-sink/forms.html): full name (autocomplete=name), email (autocomplete=email), department select, request type radio group in a fieldset with a legend, and a details textarea with a 1000-character MaxChar counter. Submit is btn btn-primary.
5. A drawer FAQ with 3 questions.
Validation and submit logic go in js/request-form.js. POST to [endpoint] with a CSRF token. Don't log form contents.
Staff directory
Template: blank-slate.html
- h1 and a filter input group
- DataTables table from a JSON file
- Call-to-action module: "Can't find someone?"
Create directory.html from blank-slate.html. Add "Directory" to the drawer and the navbar.
Canvas:
1. h1 "Staff Directory" and a one-line intro.
2. The DataTables widget (widgets/datatables.html) loading data/staff.json with the columns Name, Title, Unit, Email (mailto link), Phone. Bring the widget's CSS/JS across. Setup code goes in js/directory.js.
3. A sand CTA module (jumbotron-sand): "Can't find someone?" with a btn btn-default linking to [campus directory].
Escape every value from staff.json before rendering it.
Status dashboard
Template: blank-slate.html
- h1 with a "last updated" line
- .msg.alert for active incidents (only when one exists)
- Callout content with 4 boxes: one per service, status as text
- table.styled-dark incident history
Create status.html from blank-slate.html for a [service status] dashboard.
Canvas:
1. h1 "Service Status" and a "Last updated [time]" paragraph.
2. When there's an active incident, a .msg.alert with its summary.
3. Callout content with 4 boxes (jumbotron-callout-content-two, jumbotron-orbs-1): one per service — [Email, Wi-Fi, Canvas, VPN]. Show status as words ("Operational", "Degraded") plus a Glyphicon, never color alone.
4. A table.styled-dark of the last 10 incidents inside .table-responsive, with a caption and th scope.
Load the data from [status.json] in js/status.js and escape every value. Don't use label-success/-warning/-danger or progress bars.
Knowledge base article
Template: three-column.html
- Left menu: article categories
- Middle: h1, steps, drawer FAQ
- Right: div.styled "On this page" plus a .msg.info contact box
Create kb/[article-slug].html from three-column.html. Resolve every nav href relative to kb/.
Left menu: [categories]. Middle column: h1 "[title]", an intro, an ordered list of steps, then a drawer FAQ with [3] questions. Right column: a div.styled box with h3 "On this page" and anchor links to each h2, then a .msg.info box with the help desk contact.
Guardrails
The kit's rule files enforce these automatically, and the verify check fails
when one is broken. Writing them into your prompt helps the agent get it right on the
first try.
Do
- Name the template in every new-page prompt.
- Load the Decorator CSS and JS from
cdn.ucsd.edu.
- Scope every CSS rule to
main#main-content.
- Put scripts in named files under
js/.
- Update the drawer, the navbar, and the side nav when you add a page.
- Give each module images at its documented size, with alt text.
- Keep both search forms, in the drawer and the navbar, as shipped.
Don't
- Use
*-success, *-info, *-warning, or *-danger classes.
- Use
pagination, progress-bar, label-*, or list-group. They render in stock Bootstrap colors.
- Edit the header, title band, navbar, drawer, search, or footer.
- Add
<style> blocks or style="" attributes.
- Paint the page background or stretch a color past the canvas.
- Add Font Awesome or any font besides Roboto, Teko, Brix Sans, or Refrigerator Deluxe.
- Copy markup from a browser's DOM inspector or a whole kitchen-sink page.
Review prompt
Run this after the agent finishes a page.
Review [page.html] against the Decorator rules:
- Is every change inside main#main-content?
- Do all Decorator CSS/JS tags point at cdn.ucsd.edu?
- Does any class end in -success/-info/-warning/-danger, or come only from bootstrap.min.css while painting a color?
- One h1, headings in order, alt text on every image, labels on every input, 44px touch targets?
- Does the new page appear in the drawer, the navbar, and the side nav?
Then run `npx ucsd-decorator-kit verify` and report the findings. Don't run it with --accept.
Accessibility reference: UC San
Diego website accessibility checklist.