Skip to main content
urbicon ui
source

TypesReference

Expandable type definitions panel for component documentation, with inline code blocks, literal-value badges and cross-links into the API reference.

Playground

Configure and preview the types panel

01 Type Definitions

Local types used by this component.

3 types
Name
Kind
Category
Used by
Description
Size
<TypesReference />

01 Examples

How TypesReference renders type definitions

Interface & Type Definitions

01 Button Types

Types extracted from the Button component source.

3 types
Name
Kind
Category
Used by
Description
<TypesReference
  id="types-button"
  types={sampleTypes}
  title="Button Types"
  description="Types extracted from the Button component source."
/>

02 Empty State

What happens when no types are provided

No Types

01 Types

This component has no local types.

0 types
No types match the current filter.
<TypesReference
  id="types-empty"
  types={[]}
  title="Types"
  description="This component has no local types."
/>

03 Accessibility

A named region with its own heading

The panel renders a <section> labelled by the heading it draws from title, so it is one region in the landmark list rather than an unnamed block at the end of the page.

Expanding a definition is a button

Each row's toggle carries aria-expanded and is in the tab order with a visible focus ring. Definitions are collapsed by default, so a keyboard reader passes 20 type names rather than 20 type bodies.

Cross-links are in-page anchors

The "used by" links point at rows of the API table on the same page. They are ordinary anchors — they work with the keyboard, appear in a link list, and survive being copied out of the page.

Literal values are text, not colour

A union type's members render as badges whose meaning is in their text. Nothing on the panel is distinguished by colour alone.

04 API Reference

13 props
13 props 1 required
Prop
Type
Default
Description

05 Types

5 types
Name
Kind
Category
Used by
Description

06 Installation

Import

import { TypesReference } from '@urbicon-ui/docs';