Skip to main content

Customization

Props, className & the file you own.

View as Markdown

Using props

Try a prop first: the component applies it itself.

Every component page lists its props. Most of what people reach for className to do already exists as one.

Using className

Every component takes className & merges it into its own classes.

It adds what the component does not set, like the width above, and overrides what it does.

Components pass your classes through merge, which drops the class yours replaces, so c:accent wins over the component's c:white.

Using focus outline

Every component draws a focus outline, and one focus prop styles it.

Set the color, width & offset with fv:oc:*, fv:ow:* & fv:oo:*. It reaches every focusable part, not only the root.

focus={false} removes the outline & its danger, error & success tints.