Skip to content
Inkoxide

Search covers every page and heading of the docs. Use ↑ ↓ and ↵.

Components

Edit this page

Components take className, style and id, and those with a box also take debug (Debugging layout), with these exceptions: Document takes only debug; Page has no id; PageBreak takes only id; PageNumber and TotalPages take no props, PageRef only to, BookmarkTitle only level and Leader only pattern; the shapes inside an Svg take SVG attributes (fill, stroke, transform, id), and their className and style set SVG presentation (Drawing); and a Text or Link inside a Text, a run of the paragraph, takes only text styles (with verticalAlign: 'super' or 'sub'), href, lang, hyphenate and hyphenationCallback (props such as id, bookmark, pages or render are an error there).

ComponentWhat it is
DocumentThe PDF: title, author, subject, keywords, creator, producer, lang ("en-US"), creationDate, pageMode, pageLayout and fallbackFonts (metadata); conformance and flattenAlpha (PDF/A), userPassword, ownerPassword, permissions and entropy (passwords), tagged and pdfUA (accessibility), attachments and xmpExtensions (attachments).
PageOne page layout; content flows over as many sheets as it needs. size (a preset such as "A4", "letter" or "A4-landscape", [width, height], { width, height }, or [width] or one length for a square), orientation, margin. Padding on a page is its margin; a percentage is of the page width, on every side, as in CSS. A bg-* class sets its background, which is opaque: a colour with opacity (bg-black/5, bg-transparent) is drawn on white.
ViewA box: flex column by default, and also grid.
TextA paragraph. A Text inside a Text is an inline run (bold, colour, link).
LinkA link (href, or src): a linked run inside a Text, a box like a View elsewhere.
ImageJPEG, PNG, GIF, WebP or SVG. fit (or objectFit in its style): fill, contain, cover, none; objectPosition in its style places the fitted image.
ImageBackgroundA View with an image behind its children: src and fit as on Image (Images).
Header, FooterRepeated on every page, in the top or bottom margin.
PageNumber, TotalPagesThe current page and the page count, inside a Text.
PageRefThe number of the page another element is on (to="#id"), inside a Text (table of contents).
LeaderDots that fill the room its line has left (pattern, default '. '), inside a Text (table of contents).
BookmarkTitleThe title of the current bookmark (of level, default 1), inside a Text in a Header or Footer (running titles).
Table, Row, CellA table that splits across pages.
PageBreak, SpacerA forced page break; empty space.
Svg, Path, Rect, Circle, Ellipse, Line, Polyline, Polygon, G, Defs, ClipPath, Marker, LinearGradient, RadialGradient, Stop, Tspan, TextPathVector drawing in JSX; a Text in an Svg is SVG text.
CanvasDrawing in code: paint={(painter, width, height) => …}.
TextField (or TextInput), Checkbox, Radio, Select, List, FieldFillable form fields (AcroForm).
FieldSetA View that groups the form fields inside it under its name.
NoteA text note: an icon that opens its text in the viewer.
AttachmentAn icon that opens one of the document's attachments (file).

The one rule: a Text contains strings, numbers, PageNumber, TotalPages, PageRef, BookmarkTitle, Leader, Link, Image (an image in the line), Note, Attachment and other Text, and nothing else. A View inside a Text is an error that names the component.

Synced from packages/react/GUIDE.md in the inkoxide repository.