Skip to content
Get started

Search the docs

Quick start
Installation
Build your first page
What is public
Thinking in Turtlekit
Apps, websites and embeds
Components or native elements
Colour
Typography
Layout
Spacing, icons and shape
Components
Root
Layout
Typography
Code block
Button
Icon button
Button group
Call to action
Toolbar
Field
Text field
Text area
Select
Combobox
Date input
Save bar
Newsletter signup
File upload
Calendar
One-time code
Checkbox
Radio group
Switch
Segmented control
Toggle
Slider
Badge
Card
Data list
Item
Icon tile
Num
Time
Metric
Accordion
FAQ
Avatar
Media
Scroll area
Resizable
Carousel
Image slider
Logo cloud
Testimonials
Table
Data table
Chart
Site header
Site footer
Tabs
Page header
Breadcrumb
Pagination
Sidebar
Navigation menu
Callout
Error summary
Toast
Empty state
Skeleton
Progress
Spinner
Tooltip
Dialog
Popover
Hover card
Dropdown menu
Context menu
Menubar
Command
Elements area
Visually hidden
Error boundary
Design rules
Staying within the kit
Layout
Icons
Images and media
Typography
Readability
Colour
Composition
Accessibility
Elements
Motion
Interaction
AI pitfalls
Pricing
React design patterns
Single responsibility in React components
Presentational and container components in React
Children, function children and render props in React
The variant pattern in React
Compound components in React
Higher-order components in React
State colocation in React
Lifting state up in React
Deriving state during render
One status instead of many booleans
Adjusting state when a prop changes
Reading context with use() in React 19
Context selectors in React
Custom hooks and hook composition in React
One effect per concern in React
The latest ref pattern in React
Effect Events with useEffectEvent in React
Detecting the first render in React
Exposing methods with useImperativeHandle in React
Debouncing input in React
useDeferredValue in React
Loading components on demand in React
Virtualising long lists in React
Guard clauses and early returns in React
Skeleton placeholders in React
Rendering partial data in React
Empty states in React
Error boundaries in React
Reading async data with use() and Suspense in React
useTransition and Actions in React
Optimistic UI updates with useOptimistic
useActionState and form Actions in React
useSyncExternalStore in React
Ref as a prop and ref cleanup in React 19
Accessible ids with useId in React
Portals in React
Roving focus and keyboard navigation in React
Controlled and uncontrolled components in React
The state reducer and prop getters in React
Headless components and the provider pattern in React
The polymorphic as prop in React

Appearance

These change every page and preview on this site.

What is public

Turtlekit follows Semantic Versioning. This page says what that promise covers: what stays as it is until 2.0, what may still move, and what is the kit's own.

Three tiers

Stable

The 123 components, 16 hooks and the helpers you import from turtlekit, with their types. Every prop in a component’s props table, and its values. The tokens: the --tk-* custom properties of the colour, type, space, size, radius, shadow and motion scales, and each palette’s 12 steps. The attributes of native elements inside <Elements>. The stable paths below.

These change only in a major release. A name is first marked deprecated in a minor release, and keeps working until the major.

Provisional

Files that work today and whose names may move: the CSS parts, the kit’s source stylesheets and token files, the font files. A name changes only in a minor release, with a line in the changelog, and never in a patch.

Internal

Everything else: the kit’s tk- class names, the data attributes its components write, and the custom properties of single components (--tk-switch-*, --tk-card-*). These can change in any release.

New components, props, values and tokens arrive in minor releases and are stable from the release that brings them. The changelog names each one.

Paths

Stable paths

turtlekit
The components, hooks and helpers.
turtlekit/styles.css
The whole stylesheet.
turtlekit/dist/css/turtlekit.css
The same file, by its longer address.
turtlekit/dist/css/turtlekit-isolated.css
The stylesheet for a screen inside another product.
turtlekit/fonts.css
The fonts alone, for the page around a widget.
turtlekit/embed
A widget on someone else’s page.
turtlekit/host
The components for a host that brings its own React.
turtlekit/dist/css/parts/manifest.json
The list of CSS parts; the same in parts-isolated/.

Provisional paths

turtlekit/dist/css/parts/*.css
The CSS parts. Read each file’s name from the manifest: the way the stylesheet is cut may change.
turtlekit/css/*
The kit’s source stylesheets. A file may be renamed, split or merged.
turtlekit/tokens/*
The token files. The token names inside them are stable.
turtlekit/fonts/*
The font files: the kit’s own, loaded through turtlekit/fonts.css, and the font packs, each one stylesheet, turtlekit/fonts/<id>.css, imported after the kit’s.
turtlekit/dist/css/turtlekit-shadow.css
The stylesheet mountEmbed carries. Mount with mountEmbed.

Styling your own page

Page CSS uses your own class names and reads the kit’s tokens. On the Root’s element, .tk-root, data-tk-theme, data-accent-color and data-gray-color are stable, for the rare rule that must know the theme; the tokens already follow it.

.plan-card {
  padding: var(--tk-space-4);
  border-radius: var(--tk-radius-md);
  border: var(--tk-border-width) solid var(--tk-color-border-subtle);
  background: var(--tk-color-bg-surface);
}

A component’s look is set through its props. Its class names and the attributes it writes are internal, so a rule that targets them can stop matching in any release.

Deprecated in 1.x

10 helper functions were exported in 1.0 and are the kit’s own working parts. They keep working through 1.x, show as deprecated in your editor, and leave the exports in 2.0. Each is listed with what to use in its place.

baseButtonAttributes
Button
loadingContents
Button
niceTicks
Chart
pageRange
Pagination
parseMonth
validateDate
placeBelow
Popover
readTheme
useTheme
tabListAttributes
TabList
testimonialsColumns
Testimonials
testimonialsLayout
Testimonials