renderpx
Theme: auto

Design System

UI Components

Four composable building blocks used throughout this site. Each component is built with class-variance-authority for variant management and CSS custom properties for automatic light/dark mode support.

How and why this system was designed: Design System Architecture →

Button

A polymorphic button with four visual variants and three sizes. Supports the Radix asChild pattern to apply button styles to any element without wrapping it in an extra DOM node.

Variants

Sizes

States

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'ghost' | 'outline''primary'Visual style of the button.
size'sm' | 'md' | 'lg''md'Controls padding and font size.
asChildbooleanfalsePasses all styles to the direct child via Radix Slot (polymorphic rendering).
disabledbooleanfalseDisables interaction and reduces opacity to 50%.
...restButtonHTMLAttributes<HTMLButtonElement>-All native button attributes are forwarded.
button.tsxtsx
Loading...

Badge

A pill-shaped label for status indicators and metadata tags. Uses the same semantic color tokens as Callout, keeping the palette consistent across the system.

Variants

DefaultSuccessWarningMuted

Sizes

SmallMediumLarge
PropTypeDefaultDescription
variant'default' | 'success' | 'warning' | 'muted''default'Color theme of the badge.
size'sm' | 'md' | 'lg''md'Controls padding and font size.
...restHTMLAttributes<HTMLSpanElement>-All native span attributes are forwarded.
badge.tsxtsx
Loading...

Callout

A bordered box for surfacing important information inline with content. The optional title renders in a variant-matched color. Omit it for body-only callouts.

Info

Use this for general tips or contextual information.

Success

The operation completed successfully.

Warning

This action cannot be undone.

Note

Worth keeping in mind as you proceed.
A callout without a title, for body-only content.
PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'note''info'Color theme applied to border, background, and title.
titlestringundefinedOptional heading rendered above the body content.
childrenReactNode-Body content displayed below the title.
...restHTMLAttributes<HTMLDivElement>-All native div attributes are forwarded.
callout.tsxtsx
Loading...

InlineCode

A minimal <code> wrapper for short snippets inline with prose. Uses --inline-code-bg so it adapts to the active theme automatically.

Use useState for local component state and useReducer when logic grows complex.

Install the package: npm install @render-px/ui

PropTypeDefaultDescription
childrenReactNode-Code content to display.
classNamestring''Additional CSS classes merged into the element.
...restHTMLAttributes<HTMLElement>-All native code element attributes are forwarded.
inline-code.tsxtsx
Loading...