The Element SDK is in beta and not yet publicly released — APIs may change without notice.
Stack, Text, Button, and Icon — design-token-aligned layout and typography components
The SDK ships four lightweight React components that keep your element visually consistent with the Internote aesthetic. They are thin wrappers around standard HTML — opinionated enough to use the right design tokens, but simple enough not to constrain your layout.
Import from the root or from the /ui subpath:
A flexbox container with token-based spacing. The primary layout primitive.
Convenience aliases Stack.V (vertical, the default) and Stack.H (horizontal) save a prop:
direction ('v' | 'h'; default: 'v') — Flex direction — vertical or horizontal.gap (0 | 1 | 2 | 3 | 4; default: 0) — Token-based gap between children.center (boolean; optional) — Center both axes.alignCenter (boolean; optional) — Center on the cross axis only.justifyBetween (boolean; optional) — Space children with justify-content: space-between.All standard div props (className, style, onClick, etc.) are forwarded.
Styled text with size and font-family tokens. Renders any inline or block HTML element.
as ('p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'label'; default: 'span') — HTML element to render.size ('sm' | 'md' | 'lg'; default: 'md') — Font size from the design token scale.family ('sans' | 'serif' | 'mono'; default: 'sans') — Font family token.secondary (boolean; optional) — Muted colour variant for labels and supporting text.All standard HTML element props are forwarded.
A styled button with variants, icon support, and an active state.
variant ('default' | 'primary' | 'ghost'; default: 'default') — Visual style. primary is the accent-coloured action button; ghost is borderless.icon (BuiltinIconName | ReactElement; optional) — Icon rendered before the label.iconOnly (boolean; optional) — Square padding, no text visible. Use when the icon is self-explanatory.active (boolean; optional) — Highlighted active/pressed state.disabled (boolean; optional) — Standard HTML disabled behaviour.All other <button> props are forwarded.
Renders a built-in glyph by name, or any custom SVG via the glyph prop.
play pause restart loop next prev fullscreen exit-fullscreen copy check
name (BuiltinIconName; optional) — Render one of the built-in SVG glyphs.glyph (ReactElement; optional) — Custom SVG or any React element. Takes precedence over name.size (number | string; default: '1em') — Font size, inherits surrounding font size by default.aria-label (string; optional) — Accessible label. Provide one when the icon conveys meaning without surrounding text.A small control panel using all four components:
All four components use CSS custom properties injected by @internote/element-sdk/styles. The stylesheet is the same source as the host application's theme — your element automatically inherits light/dark mode and the user's accent colour.
Use these variables in your own CSS for a consistent look: