Developers Page
v1.0.0Added in 1.8.0
A developer platform page: a code editor hero with language tabs, API surfaces, a live CLI terminal, endpoint explorer, uptime and limits.
The hero rises in once on mount. Get an API key spins for a moment, then shows a test key once with a copy button; the install pill copies its command and follows the selected language. In the code editor the TypeScript, Python, Go and cURL tabs swap the request (arrow keys move between tabs), the copy button copies the snippet, and Run sends a pretend request: the response dims, then comes back with a fresh latency that is announced to screen readers. Long lines scroll sideways inside the code panes, never the page, and each pane is focusable for keyboard scrolling. Every API surface card is one link. The CLI terminal plays its lines in sequence the first time it scrolls into view (deploy, then live webhook events) and the replay button runs it again; reduced motion and animateIn={false} show it complete. The endpoint explorer filters by resource with pill tabs and by text with the search field (press / to focus it); rows link to the reference and an empty result offers to clear the filters. The p95 latency ticks while on screen, the 90-day uptime bars show a tooltip per day, and the changelog entries and community cards are single links. The editor and terminal stay dark in both themes unless codeTheme is auto.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
Add to a project
npx wingo-ui@latest add developers-pagePro item: the CLI needs a Pro account. See plans
Usage
// app/(marketing)/developers/page.tsx
"use client"
import Link from "next/link"
import { DevelopersPage } from "@/components/templates/developers-page"
export default function DevelopersRoute() {
return (
<DevelopersPage
linkComponent={Link}
onCreateKey={async () => {
const response = await fetch("/api/keys", { method: "POST", body: JSON.stringify({ mode: "test" }) })
if (!response.ok) throw new Error("Could not create a key")
const { secret } = (await response.json()) as { secret: string }
return secret
}}
/>
)
}Props
snippetsdefault"DEVELOPERS_SNIPPETS"DevelopersSnippet[]The editor tabs: { value, label, filename, language, method?, install, code }; install feeds the hero pill.
responsedefault"DEVELOPERS_RESPONSE"stringThe JSON in the response pane.
surfacesdefault"DEVELOPERS_SURFACES"DevelopersSurface[]API surface cards: { id, title, description, meta?, href, visual } with visual rest, graphql, webhooks, oauth, sdks or cli.
endpointGroupsdefault"DEVELOPERS_ENDPOINT_GROUPS"DevelopersEndpointGroup[]The explorer's filter tabs: { value, label }; the first one is the starting filter, value all matches every endpoint.
endpointsdefault"DEVELOPERS_ENDPOINTS"DevelopersEndpoint[]{ method, path, description, group, scope?, href } rows of the endpoint explorer.
terminaldefault"DEVELOPERS_TERMINAL"DevelopersTerminalLine[]The CLI terminal: { kind: comment | command | output | success | event | blank, text?, status?, time? }.
statsdefault"DEVELOPERS_STATS"DevelopersStat[]{ id, value, decimals?, prefix?, suffix?, label, description? } figures; the one with id latency ticks live.
rateLimitsdefault"DEVELOPERS_RATE_LIMITS"DevelopersRateLimit[]{ plan, perMinute, burst, webhooks } rows; perMinute 0 reads as Custom.
regionsdefault"DEVELOPERS_REGIONS"DevelopersRegion[]{ id, name, latency } median latency per region under the uptime bars.
changelogdefault"DEVELOPERS_CHANGELOG"DevelopersChangelogEntry[]{ version, date, kind, title, description, href } API releases, newest first.
communitydefault"DEVELOPERS_COMMUNITY"DevelopersCommunityLink[]{ id, icon: github | discord | calendar, title, description, meta, action, href } cards.
labelsdefault"DEFAULT_DEVELOPERS_PAGE_LABELS"Partial<DevelopersPageLabels>Every visible string: the hero, editor, section headings, CLI steps, explorer, limits and CTA copy.
designdefault"classic""classic" | "bold" | "minimal"The whole page's look. classic follows the layout props; bold: a pill header, a split hero with heavy type beside the editor, rounder cards, an inverted CLI band, an image band CTA and a wordmark footer; minimal: a transparent header, no grid or glow, code that follows the page theme, flat outlined cards, no gray bands, a plain CTA and a simple footer. ctaProps, headerProps and footerProps still win.
heroLayoutdefault"centered""centered" | "split"centered: the copy over a wide editor with request and response side by side; split: copy left, editor right. Applies to the classic design.
codeThemedefault"dark""dark" | "auto"dark keeps the editor and terminal dark in both themes; auto lets them follow the page. Applies to the classic and bold designs.
defaultLanguagedefault"typescript"stringThe snippet tab on load (a snippet value).
languagestringThe active snippet tab, controlled.
onLanguageChange(language: string) => voidCalled with the snippet value when a tab is picked.
showSurfacesdefaulttruebooleanThe API surface cards.
showTerminaldefaulttruebooleanThe CLI section with the terminal.
showEndpointsdefaulttruebooleanThe endpoint explorer.
showReliabilitydefaulttruebooleanThe numbers, uptime bars and rate limits.
showCommunitydefaulttruebooleanThe API changelog and community cards.
showCtadefaulttruebooleanThe closing call to action.
alternatedefaulttruebooleanGray bands on every other visible section. Applies to the classic and bold designs.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"Accents: the announcement badge, the glow behind the editor, the drawn visuals, step numbers and the terminal prompt.
ctaTonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"Get an API key, the header's Get started and the closing band; brand is the marketing orange.
headerdefaulttruebooleanThe marketing header; off inside a site layout.
footerdefaulttruebooleanThe marketing footer with its newsletter form.
headerPropsPartial<MarketingHeaderProps>Passed to MarketingHeader.
footerPropsPartial<MarketingFooterProps>Passed to MarketingFooter.
ctaPropsPartial<CtaSectionProps>Overrides for the closing CtaSection (variant, hrefs, checklist...).
onCreateKey() => (string | void | Promise<string | void>)The hero's Get an API key. The button spins while a promise runs; resolve with the key to show it once with a copy button, reject to show an error. Without it the page waits 900 ms and shows a test key.
onSubscribe(email: string) => (void | Promise<unknown>)The footer newsletter; a rejected promise shows an error. Without it the form waits 900 ms and confirms.
animateIndefaulttruebooleanThe hero rises in, the terminal plays its lines and the latency ticks; false keeps the page still and complete (thumbnails). Reduced motion always does.
localedefault"en-US"stringIntl locale for the numbers, rate limits and changelog dates.
linkComponentdefault"<a>"(props: LinkComponentProps) => ReactNodeThe router link for every link on the page (next/link in an app).
classNamestringClasses for the root.
classNamesPartial<Record<DevelopersPageSlot, string>>Classes for header, hero, editor, surfaces, surface, terminal, endpoints, reliability, community, cta and footer.
Parts
DEVELOPERS_PAGE_SAMPLE
constantAll the sample content in one object: snippets, response, surfaces, endpoints, terminal, stats, limits, regions, changelog and community.
DEVELOPERS_SNIPPETS
constantCreating a task in TypeScript, Python, Go and cURL.
DEVELOPERS_RESPONSE
constantThe task JSON the API answers with.
DEVELOPERS_SURFACES
constantSix cards: REST API, GraphQL, Webhooks, OAuth apps, Official SDKs and Acme CLI.
DEVELOPERS_ENDPOINT_GROUPS
constantAll, Tasks, Docs, Projects and Webhooks.
DEVELOPERS_ENDPOINTS
constantTwelve endpoints across tasks, docs, projects and webhook endpoints.
DEVELOPERS_TERMINAL
constantacme deploy, then acme listen with four live events.
DEVELOPERS_STATS
constantUptime, p95 latency, monthly requests and edge regions.
DEVELOPERS_RATE_LIMITS
constantFree, Pro, Business and Enterprise limits.
DEVELOPERS_REGIONS
constantSix regions with their median latency.
DEVELOPERS_CHANGELOG
constantFour API releases: new, improved, fixed and deprecated.
DEVELOPERS_COMMUNITY
constantGitHub, Discord and office hours.
DEFAULT_DEVELOPERS_PAGE_LABELS
constantThe English strings, including the three CLI steps.
DEVELOPERS_PAGE_DESIGNS
constantThe design names, classic first: ["classic", "bold", "minimal"].
DevelopersPageProps
typeProps of DevelopersPage.
DevelopersPageDesign
type"classic" | "bold" | "minimal".
DevelopersPageLabels
typeThe strings labels can override.
DevelopersSnippet
typeOne editor tab: { value, label, filename, language, method?, install, code }.
DevelopersEndpoint
typeOne endpoint row.
DevelopersTerminalLine
typeOne terminal line.
Examples
Bold design
design="bold": a pill header, a split hero with heavy type beside the editor, an inverted CLI band and a wordmark footer.
Minimal design
design="minimal": no grid or glow, code that follows the page theme, outlined cards, no gray bands and a simple footer.
Brand orange
tone and ctaTone brand: an orange glow behind the editor, orange step numbers and prompt, and an orange key button and closing band.
Python first, split hero
The copy beside the editor, Python selected on load and code that follows the page theme.
API landing, short
Hero, endpoints and the closing band only, inside a site layout without header and footer.
Dependencies
Files
- components/templates/developers-page.tsx
- components/templates/developers-page-data.ts