---
title: "Palette Strip"
description: "A palette as one bar of colors, each part as wide as its share. A thin edge keeps a white part clear on a white page."
url: https://gelatinui.com/components/palette-strip
markdown_url: https://gelatinui.com/components/palette-strip.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/palette-strip"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Palette Strip

> A palette as one bar of colors, each part as wide as its share. A thin edge keeps a white part clear on a white page.

Page: https://gelatinui.com/components/palette-strip

## When to use it

Best for: Show a palette as one small bar of colors, in a card, a list row, or a header.

- Use it to show a set of colors in little space.
- Use `palette.weights` to size each part by its share.
- Use `gap` when the colors are separate things, such as status colors.

## When not to use it

- To pick a palette, use a [Palette Picker](https://gelatinui.com/components/palette-picker.md).
- To show one color, use a [Color Swatch](https://gelatinui.com/components/color-swatch.md).

## Notes for agents

- It is a display. It takes no input.
- `colors` wins when both `colors` and `palette` are set.
- `size` is `sm` (16px), `default` (24px), or `lg` (48px).
- With no colors it shows a dashed box of the same size.
- Next to text that names the palette, pass `aria-hidden`.

## Anatomy

```text
PaletteStrip
└─ PaletteStripColor (0..n)
```

## API reference

### PaletteStrip

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm"` |  |  |
| `palette` | `ColorPalette` |  | The palette: its colors, weights, and name. `colors` wins when both are set. |
| `colors` | `readonly string[]` |  | The colors, any CSS colors, when there is no palette. |
| `orientation` | `"horizontal" \| "vertical"` | "horizontal" | `horizontal` (default) fills the width; `vertical` stacks the parts. |
| `gap` | `boolean` | false | 2px gaps between the parts; each part keeps 2px corners and its own edge. |
| `children` | `function \| ReactNode` |  | Custom parts: `PaletteStripColor` elements, or a function that renders each color (`({ color, weight, index }) => <PaletteStripColor … />`). Default: one part per color. |
| `labels` | `Partial<{ empty: string; }>` |  | The words (`PALETTE_STRIP_LABELS`), to translate them. Keep the object stable. |

### PaletteStripColor

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `color` | `string` |  | The color of the part, any CSS color. |
| `weight` | `number` | 1 | The share of the strip, in any unit (the same unit for every part). Default 1. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| PaletteStrip | `palette-strip` | `data-orientation` | `--palette-strip-radius`, `--radius`, `--radius-md`, `--radius-sm` |  |
| PaletteStripColor | `palette-strip-color` |  | `--palette-strip-radius`, `--radius` |  |

## Usage

Put one `PaletteStripColor` for each color. A `weight` sets its share of the strip, so a 60-30-10 brand palette reads at a glance.

```tsx title="brand-palette.tsx"
import { PaletteStrip, PaletteStripColor } from "@/components/ui/pro/palette-strip";

export function BrandPalette() {
  return (
    <PaletteStrip aria-label="Brand palette: ivory, navy, coral">
      <PaletteStripColor color="#F7F3EA" weight={60} />
      <PaletteStripColor color="#1F2A44" weight={30} />
      <PaletteStripColor color="#FF6B5B" weight={10} />
    </PaletteStrip>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/palette-strip
```

It adds 5 registry items: 5 files, 384 lines, and the npm packages `react-aria-components`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Palette Picker](https://gelatinui.com/components/palette-picker.md)
- [Color Swatch](https://gelatinui.com/components/color-swatch.md)
- [Color Scale](https://gelatinui.com/components/color-scale.md)
