Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ca2b204
standard format for end docs
MichaelUnkey Jul 2, 2025
0d2d96e
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 3, 2025
c99cabc
manual props table
MichaelUnkey Jul 7, 2025
8639529
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 7, 2025
8f9ef49
Merge branch 'main' into eng-1870-consistent-layout-for-engineering-d…
perkinsjr Jul 7, 2025
f99a25f
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 7, 2025
fb6c8d8
some rabbit changes
MichaelUnkey Jul 7, 2025
f2fc3ee
rabbit changes
MichaelUnkey Jul 7, 2025
4a51c69
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 7, 2025
e335607
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 7, 2025
0655fef
rabbit
MichaelUnkey Jul 7, 2025
be0b566
spacing
MichaelUnkey Jul 7, 2025
c525653
rabbit
MichaelUnkey Jul 8, 2025
cb348a5
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 8, 2025
22cd48a
rabbit
MichaelUnkey Jul 9, 2025
864a70b
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 9, 2025
2a36998
missing overview added
MichaelUnkey Jul 9, 2025
a3eec0e
Update apps/engineering/content/design/components/buttons/refresh-but…
MichaelUnkey Jul 9, 2025
bceb0cd
Merge branch 'main' of https://github.com/unkeyed/unkey into eng-1870…
MichaelUnkey Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/engineering/app/design/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { componentSource } from "@/app/source";
import { createTypeTable } from "fumadocs-typescript/ui";
import { TypeTable } from "fumadocs-ui/components/type-table";
import defaultMdxComponents from "fumadocs-ui/mdx";
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page";
import type { Metadata } from "next";
Expand All @@ -15,7 +15,6 @@ export default async function Page(props: {
if (!page) {
notFound();
}
const { AutoTypeTable } = createTypeTable();

const MDX = page.data.body;

Expand All @@ -26,7 +25,7 @@ export default async function Page(props: {
<DocsDescription>{page.data.description}</DocsDescription>

<DocsBody>
<MDX components={{ ...defaultMdxComponents, AutoTypeTable }} />
<MDX components={{ ...defaultMdxComponents, TypeTable }} />
</DocsBody>
</DocsPage>
);
Expand Down
68 changes: 56 additions & 12 deletions apps/engineering/content/design/components/badge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: A versatile badge component for displaying status, categories, or l
---
import { DefaultVariants, SizeVariants, MonoFont, StatusBadges, InteractiveBadges } from "./badge.example";

## Overview

The Badge component provides a consistent way to display status indicators, categories, or labels throughout your application. It's designed to provide quick visual context with multiple styling options and accessibility features.

## Usage

```tsx
Expand All @@ -23,20 +27,39 @@ export default function MyComponent() {
## Examples

### Default Variants
All available variants for different use cases.
<DefaultVariants />

### Size Variants
Different sizes available for the badge component.

<SizeVariants />

### Monospace Font
Badges with monospace font for technical content like IDs or codes.

<MonoFont />

### Status Badges
Common status indicators used in applications.

<StatusBadges />

### Interactive Badges

Interactive styling with hover effects.

<InteractiveBadges />

## Features

- **Multiple Variants**: Six different visual styles (primary, secondary, success, warning, blocked, error)
- **Size Options**: Default and small sizes for different contexts
- **Font Options**: Support for monospace font for technical content
- **Accessibility**: Built-in accessibility support with proper contrast ratios
- **Customizable**: Extensive styling options through className prop
- **Responsive**: Adapts to different screen sizes

## Props

| Prop | Type | Default | Description |
Expand All @@ -55,19 +78,40 @@ export default function MyComponent() {
- **blocked**: Orange styling for blocked or restricted states
- **error**: Red styling for errors or negative states

## Accessibility
## Structure

The Badge component follows accessibility best practices:
The Badge component is a simple, self-contained component that doesn't require sub-components. It renders as a single span element with appropriate styling and accessibility attributes.

- Uses semantic HTML with proper color contrast ratios
- Text is readable and meets WCAG guidelines
- Can be used with screen readers without issues
- Hover states provide visual feedback for interactive elements
## Styling

## Best Practices
The Badge component includes default styling with:

- Consistent padding and border radius
- Color-coded variants for semantic meaning
- Dark mode support
- Hover states for interactive badges
- Focus states for accessibility
- Responsive design

### Custom Styling

You can customize the appearance using the className prop:

```tsx
<Badge
variant="primary"
className="custom-badge-class hover:bg-blue-500"
>
Custom Badge
</Badge>
```

## Accessibility

The Badge component follows accessibility best practices:

- Use badges to provide quick visual context about status or categories
- Choose appropriate variants that match the semantic meaning
- Keep badge text concise and descriptive
- Use consistent badge styling across your application
- Consider using the monospace font for technical content like IDs or codes
- **Semantic HTML**: Uses semantic HTML with proper color contrast ratios
- **Text Readability**: Text is readable and meets WCAG guidelines
- **Screen Reader Support**: Can be used with screen readers without issues
- **Visual Feedback**: Hover states provide visual feedback for interactive elements
- **Focus Management**: Proper focus states for keyboard navigation
Loading
Loading