API Table

A reusable table component for displaying API documentation with consistent styling.

Usage

Component Props

The available props for this component.

PropertyTypeDefaultDescription
size"sm" | "md" | "lg""md"The size of the component.
variant"default" | "ghost""default"The visual style of the component.
1import { ApiTable } from "aviris-components";23const properties = [4  {5    name: "size",6    type: '"sm" | "md" | "lg"',7    defaultValue: '"md"',8    description: "The size of the component.",9  },10  {11    name: "variant",12    type: '"default" | "ghost"',13    defaultValue: '"default"',14    description: "The visual style of the component.",15  },16];1718export default function ApiTableDemo() {19  return (20    <ApiTable21      title="Component Props"22      description="The available props for this component."23      properties={properties}24    />25  );26}

Without Default Column

Use the showDefault prop to hide the Default column when displaying interface properties.

Interface Properties

PropertyTypeDescription
iconReact.ReactNodeRequired. The icon to display.
labelstringRequired. The label text.
1import { ApiTable } from "aviris-components";23const properties = [4  {5    name: "icon",6    type: "React.ReactNode",7    description: "Required. The icon to display.",8  },9  {10    name: "label",11    type: "string",12    description: "Required. The label text.",13  },14];1516export default function ApiTableDemo() {17  return (18    <ApiTable19      title="Interface Properties"20      properties={properties}21      showDefault={false}22    />23  );24}

Props

PropTypeDefaultDescription
titlestring-Optional title to display above the table.
descriptionstring-Optional description text to display below the title.
propertiesProperty[]-Array of properties to display in the table.
showDefaultbooleantrueWhether to show the Default column.

Property Definition

The shape of each property in the properties array.

PropertyTypeDescription
namestringRequired. The name of the property.
typestringRequired. The type definition of the property.
defaultValuestringOptional default value of the property.
descriptionstringRequired. Description of the property.