Components
Interface components and how to use them
Cursiv’s interface is built from shadcn-svelte components, adapted to the brand. The examples on this page are the real components: try them.
They follow the rest of this guide:
- Ink on Paper. Primary actions are Ink, with Paper text. See Colours.
- Square and flat. No rounded corners and no shadows, as Layout & Spacing asks. Only radio buttons and switches stay round: they are circles, not rounded boxes.
- Rules, not boxes. Cards and messages are separated by thin rules.
- IBM Plex Mono for the interface. Buttons, labels, and fields use the body typeface; titles use Switzer. See Typography.
- Copper marks the current item, such as the selected tab. Never for errors.
- Quiet motion. Menus and dialogs fade in. Nothing zooms or slides. See Motion.
- Phosphor Thin icons. See Iconography.
Buttons
- Use one primary button per view, for the main action.
- Use outline for secondary actions, ghost for quiet ones such as Cancel, and link for navigation inside text.
- Label buttons with a verb that says what happens: “Publish book”, not “Submit”.
Text fields
An ISBN has 13 digits. Check the number and try again.
- Put the label above the field, and keep it short.
- Use the placeholder for an example, never instead of a label.
- When something is wrong, say what happened and what to do, below the field. Cursiv has no warning red: errors use Ink and clear wording, as in Voice & Tone.
Choices
- Use a checkbox for an option that takes effect when the form is sent, and a switch for a setting that takes effect at once.
- Use radio buttons for up to five options, and a select for more.
Tabs
- Use tabs to switch between views of the same thing, such as the stages of a book.
- A Copper rule marks the current tab.
Status and messages
- Badges show a status in a word or two.
- Messages sit behind an Ink rule. Keep them calm and practical: what happened, and what to do.
Cards
- A card groups one thing, such as a book, between rules above and below. Avoid boxes and shadows.
Dialogs and tooltips
- Use a dialog to confirm an action that matters, such as publishing. Name the action on its button.
- Use a tooltip for a short explanation, never for information people need to continue.
Using the components
The components need Svelte 5 and Tailwind CSS v4.
-
Set up shadcn-svelte in your project.
-
Download brand.css and shadcn.css next to your CSS file, and import them after Tailwind:
@import "tailwindcss"; @import "tw-animate-css"; @import "./brand.css"; @import "./shadcn.css";brand.css holds the fonts and design tokens. shadcn.css maps them onto shadcn-svelte’s colour roles, with square corners and no shadows. Both are generated from this guide whenever it is published, so they always match it.
-
Add components with
npx shadcn-svelte@latest add, then follow the guidance on this page.