Skip to main content
urbicon ui

ApiReference

Structured API reference table — renders prop names, types, defaults, and descriptions with source and required badges.

01 Examples

Rendering a generated prop table

A page's API section

On a component page the table comes from ReferenceSections: it renders the API Reference section around this table and the Types section below it, both from the one componentData you pass, so every type name in the Type column links to a row that exists. Compose ApiReference and TypesReference yourself only for a page that documents several components under one Types section.
3 props 1 required
Prop
Type
Default
Description
<script lang="ts">
  import { ReferenceSections } from '@urbicon-ui/docs';
  import { componentData } from './api';
</script>

<ReferenceSections {componentData} />

Notes the generator cannot know

The usageNotes snippet renders below the table — for editorial guidance that belongs to the API as a whole rather than to any single prop.
<ApiReference props={componentData.props} slotClasses={{ stats: 'hidden' }}>
  {#snippet usageNotes()}
    <p>Sizes below <code>md</code> are reserved for dense toolbars.</p>
  {/snippet}
</ApiReference>

02 Accessibility

It is a table, and it says so

The props render through @urbicon-ui/table, so the browser exposes real rows and columns: a screen reader announces "row 4 of 26, column Type" instead of reading a wall of divs. Sorting a column updates aria-sort on its header.

Badges are not the only signal

Required props and their source are marked with a badge and with text in the badge, never with colour alone — the required marker reads "required", not a red dot.

Type cross-links

A type that resolves to a local definition renders as a link into the Types section on the same page. It is an ordinary in-page anchor, so it works with the keyboard and appears in the link list a screen reader can bring up.

03 API Reference

8 props
8 props 1 required
Prop
Type
Default
Description

04 Types

3 types
Name
Kind
Category
Used by
Description

05 Installation

Import

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