Documentation
Propstable

Props Table

A table that displays all Component.propTypes and Component.defaultProps with type annotations as Tooltip popup.

Component prop types should use Webframe type proxy for automatic description from code comments using webframe-docs (opens in a new tab) CLI.

Prop descriptions can use Markdown syntax and will be parsed, including links.

Examples

Button Component

Button.jsx
import { type } from '@webframer/ui'
 
export function Button (props) {
  // ...component code
}
 
Button.propTypes = {
  // Button content
  children: type.NodeOrFunction.isRequired,
  // ...more props
}
Button Props Table Demo
PropTypeDefaultDescription
children
String
|
Number
|
Boolean
|
Function
Required

Button content

className
Class Name

CSS class names separated by space

active
Boolean

Whether to add active css class

disabled
Boolean

Whether the button is disabled

loading
Boolean

Whether to show loading state

type
Enum

Button type

tooltip
String
|
Number
|
Boolean
|
Function
|
Object

Tooltip props (or content) to display as popup on interaction with this component

_ref
Function
|
Object