Skip to content
DocumentationProps and customization

Docs · Using components

Props and customization

Every component is adjusted with its props. For everything else you have className, style and the component's own CSS variables.

On this page

Props of each component

Each component's props are in a table on its catalog page, with their type, default value and a line explaining what they do. The Live controls panel on that same page moves the same props live. As an example, this is the props table for Decipher Text, taken from its page:

PropTypeDefaultDescription
textstring"Decipher the message"Final text to reveal.
speednumber16Letters that settle per second.
delaynumber0Milliseconds of scrambling before the first letter settles.
scrambleCharsstring"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#$%&*+<>/?!"Alphabet the random characters are drawn from.
revealDirection"left" | "right" | "center" | "random""left"Where letters start to settle: "left", "right", "center" or "random".
trigger"mount" | "cursor" | "both""both"When it deciphers: "mount" (on mount), "cursor" (on hover) or "both".
colorstring"inherited"Color of the letters that have already settled (inherits the text color by default).
scrambleColorstring"dimmed text"Color of the letters still scrambling (defaults to the same text, dimmed).
classNamestring""Extra CSS class for the container.
styleCSSProperties"{}"Inline styles for the container (size and font go here).

Props are named in English (speed, color, intensity). Use the names exactly as they appear in each component's table.

To see every component with a link to its page, go to Components by category.

className and style

Every component accepts className and style, and applies them to the component's container. Size, font, margins and anything that isn't a prop of its own go here:

TSX
<DecipherText
  text="Hello, furin"
  className="headline"
  style={{ fontSize: 56, fontWeight: 700 }}
/>

If the component shows text, it usually inherits color, size and font from the element you place it in.

CSS variables

Component colors and sizes are exposed as CSS variables (custom properties) on the root element. Usually a prop such as color or background fills them in, but you can also set them yourself through style. style is normally applied after the props, so whatever you put there wins:

TSX
import type { CSSProperties } from "react";

<DecipherText
  text="Hello, furin"
  style={{ "--furin-decipher-text-color": "tomato" } as CSSProperties}
/>

That example does the same as the color prop; it's only there to show how it works. Each component lists its variables in its own .css: for free components you can see it in the Code tab; look for the ones that start with --. The as CSSProperties is there because TypeScript doesn't know each component's variables.

Size and position

  • Components in the Backgrounds category fill their container: they're either position: absolute layers that cover the nearest positioned container, or they're 100% of its width and height. Give that container position: relative and a height.
  • Those that accept children draw them on top. If a background covers the whole page instead of your section, the container is almost always missing position: relative.
  • Those that show text take their size from font-size: set it in style or on the element that wraps them.

Modifying the code

If you installed with shadcn or copied the files, the code is yours and you can edit it: free components are MIT and Pro ones use the commercial license (Licenses). Two tips:

  • Prefer props, className and style whenever they're enough: that way you get fixes without fighting your own changes.
  • If you edit a component and then install it again, the CLI may overwrite your changes. Keep your modifications in version control.

Spot a mistake or something missing? Email us at contacto@furin.dev.