# SnowUI Component Styling Guide
Read the complete [LICENSE](https://snowui.dev/LICENSE) for the installed version before use.
Source fingerprint: `eff08e32ec408bc4`.
## Define the scope of the change
Before using or changing SnowUI, read the complete [LICENSE](https://snowui.dev/LICENSE) for the target version once per task, version, and confirmed scope. Each plan permits necessary source, style, interaction, and framework changes within its authorized purpose, products, and developer count. Free source is not unmodifiable just because it is free, but a download does not grant rights for a real online product or redistribution.
Read the [design guide](https://snowui.dev/components/design-system), then the relevant component’s `api.md`, `reference.md` for complex compositions, and `styles.md` for customization. For example, see [Button API](https://snowui.dev/components/button#api-reference) and [Button styles](https://snowui.dev/components/button/reference#style-reference). Do not load all override variables, the whole source library, or internal maintainer documents by default.
## Style selection and override order
Users and AI must follow two rules: **first match suitable styles with public component Props; preserve the component’s original appearance wherever possible.** If the default already works, use it. Do not rewrite colors, sizes, radii, or every state merely to “customize.”
Props include the component’s actual public style controls, such as `variant`, `size`, `emphasis`, and color. Check supported values and defaults in the API, then choose the existing look closest to the requirement. Do not invent a field or recreate an existing variant in CSS. When the product or design genuinely differs, change only what is needed in this recommended order:
| Order | Approach | Decision rule |
| --- | --- | --- |
| 1 | Public component Props | Stop when they express the need; do not override a suitable default explicitly. |
| 2 | Your own `class`, including Tailwind utilities already in the project | Reuse app styles and adjust only necessary visuals through the actual public root or role or a registered override. Tailwind is a class approach, not a later priority tier. |
| 3 | This instance’s `style` | For a one-off or dynamic difference on this instance. Confirm the public entry point and avoid spreading it into a global reset. |
External apps may use their own CSS, existing Tailwind, and design values. They do not have to install SnowUI website utilities or use a custom class in at least two places. If Tailwind is already present, keep using it; do not add a styling framework for one component change. Tokens from the same SnowUI category help coordinate theme and scaling. Still match explicit design values accurately; “preserve the original” must not silently ignore a real difference.
This is an order for choosing an approach, **not a ranking of CSS cascade strength**. Layers, specificity, declaration order, and inline styles determine the result; class-string order does not guarantee an override. If a style does not apply, identify the public owner of that property and its registered override before adding `!important` or private selectors.
## Keep the existing look with Props
For example, Button already exposes a variant and size that express this button:
```svelte
```
External apps need only the component package and its packaged styles. Application overrides usually load afterward; also inspect the toolchain’s CSS layers because later loading alone does not guarantee precedence. Use the [token directory](https://snowui.dev/components/design-tokens) for SnowUI values and the [Figma mapping guide](https://snowui.dev/components/guides/figma) for Figma sources. Optional `snowui-base.css` leaves ordinary page `` links without an underline by default and changes their color from `Black40` to `Black100` on hover or keyboard focus. A page link underlined by a stylesheet rule loses that underline on non-disabled hover; SnowUI `Link` and `Button href` keep their own styles. To use `Black100 → Black40` on an ordinary link, set `--snowui-native-link-color: var(--black-100)` and `--snowui-native-link-hover-color: var(--black-40)` on it or its container. If your app writes `color` directly, it should define its own hover color; CSS cannot infer the reverse from a computed color. An underline written directly in an element’s `style` also needs an app hover rule; the base does not use `!important` to override it. Online AI hosts that do not import `snowui-base.css` do not receive these ordinary link styles.
## Use your own class when an override is necessary
For example, if the product requires a smaller radius and Button has no matching public Prop, set the registered radius override in your app stylesheet:
```css
.project-action {
--snowui-button-radius-override: var(--radius-2);
}
```
Pass that class to the target instance while retaining the chosen variant and size:
```svelte
```
Tailwind also enters through the component’s supported `class` Prop. Confirm that the project generated the utility and that it targets a public element. Set a registered override from the class when needed. Button draws its default background in its own background layer, so `bg-*` or `background-color` on the root need not change that layer. Find the actual `--snowui-button-background-override` in its `styles.md`; do not patch a private descendant.
## Use an instance style last
For a one-off or dynamic radius on this instance, set the same public override through its instance style:
```svelte
```
Do not set conflicting Props, class, and style values for the same property. A more specific instance style may override an app class. Confirm that the local difference is intended, then verify the original states still work.
## Root host, generated children, and explicit children
| Target | Public entry point | Scope |
| --- | --- | --- |
| Component root host | Exposed `class` / `style` and registered overrides | Affects the documented root or role; does not imply arbitrary descendants can be changed. |
| Generated default child | Documented `parts.ComponentName` | Configures the child’s public Props; business values, identity, roles, events, and controlled state still follow the host contract. |
| Explicit child written by the caller | Pass public Props to that child directly | Does not automatically consume parent parts; selection state, keyboard, and ARIA still follow composition rules. |
| Page-owned container | Page layout and app styles | Controls arrangement, width, spacing, and responsiveness without copying component internals. |
`parts` locates a component’s default children; it is not another override method placed after style. Use the child’s public Props through `parts.Child` first, then its supported class or style if necessary. Configure an explicitly written child directly; do not assume parent parts will change it.
For example, SearchPopup lets you configure its generated input’s placeholder and accessible name through `parts.SearchInput`:
```svelte
Readable content