Skip to content

User Interface

The Alt app uses React to create the user interface and React Dom to render it, which means you can use any HTML Element. But to match the Alt app UI style, you can use the built-in React components.

To render the user interface, export the React component on the view command type.

view-command.tsx
import { useState } from 'react';
import { UiButton } from '@altdot/extension';
export default function Command() {
const [count, setCount] = useState(0);
return (
<>
<p>Click count: {count}</p>
<UiButton onClick={() => setCount(count + 1)}>Increment</UiButton>
</>
);
}