Skip to content
Search
Search the documentation
Props Table
1 min read

Props Table

Document a component's API in a consistent table.

Document a component’s props the same way on every page: name, type, and description in one styled table, so the API reference reads consistently instead of drifting per author.

variant 'default''primary' default 'default'
Visual intent of the component.
href required string
Turns the element into a link.
disabled boolean default false
Prevents interaction.

Usage

Wrap Prop rows in a PropsTable. Give each Prop a name; add type, default, or required as needed, and put the description in the body.

			<script>
	import { PropsTable, Prop } from 'svelte-docsmith';
</script>

<PropsTable>
	<Prop name="variant" type="'default' | 'primary'" default="'default'">
		Visual intent of the component.
	</Prop>
	<Prop name="href" type="string" required>
		Turns the element into a link.
	</Prop>
</PropsTable>
		

API reference

PropsTable

title string
Optional caption, e.g. the component name when a page documents several.

Prop

name required string
Property name.
type string
Type signature, shown as code.
default string
Default value, shown beside the type.
required boolean default false
Marks the property as required.
Edit this page Last updated: Jul 12, 2026

Was this page helpful?