shadcn.io is not affiliated with official shadcn/ui
Brand Asset Settings Block for React
A logo check panel: Paper and Ink tiles showing a drawn lettermark at true size with its clear space in hairlines and its contrast worked out from the hex values, a Full, Mark or Mono toggle, a size slider that warns below 24 px, and a four-colour palette with Copy.
Installation
Overview
Check a logo before it goes anywhere small, with this brand asset panel for React with Base UI. A compact header holds the title and one action, a Shine Button that copies the palette. Inside a hairline frame with a plus mark on each corner, two tiles, Paper and Ink, show a drawn lettermark (a ring with a dot in its gap, a sample and not a real brand) at the size you choose, with its clear space drawn in hairlines, and under each one the contrast of the mark on that tile, worked out from the two hex values. A Toggle Group picks Full, Mark or Mono, and a Slider from 16 to 128 pixels sets the height; below 24 pixels it warns "Below 24 px the full logo is not legible: use the mark" and offers the switch. A side cell lists four palette colours with their hex and a Copy button each. The last band is the status line. It's built from Toggle Group, Slider, Button, Shine Button and Guides, with a CSS entrance only. For a brand kit or design system tool, a workspace branding page or a press page.
FAQ
How do I use my own logo and brand?
Replace Glyph (the inline drawing) with your own mark, and BRAND with your name; use only a logo you have the rights to. The logo is sized from one custom property, so a drawing that fills a square box of the chosen height works as it is. The clear space is a quarter of the height on every side; change clearOf for your own rule. Nothing is uploaded: this block draws a sample and never reads a file.
Why are there colours here when the rest is theme tokens?
Because a brand's colours are its content. The four palette colours are typed as hex digits (without the hash, so no colour literal sits in the source) and shown inline on the two tiles and the swatches only, as the brand's own; everything else follows the page's theme. The mark itself is greyscale, so it looks right in any preset.
What does the size check do?
The slider sets the logo's height at true size, and the sentence under it says whether it is legible: the wordmark needs at least 24 pixels, so a Full or Mono logo below that shows a warning and a Use the mark button, which switches to the mark, legible down to 16 pixels. On a narrow screen the tiles scale the largest sizes down to fit, since a wide logo at 128 pixels is wider than a phone tile. The ruler under the slider marks 24.
How is the contrast worked out?
With the WCAG formula, from the two hex values: relative luminance of each colour, then (lighter plus 0.05) over (darker plus 0.05), cut down to a tenth so a near miss never reads as a pass. Each tile's caption gives the mark's ratio and the dot's, with the words (passes AAA, passes AA, enough for graphics, too low). Change the palette and the numbers follow.
What does Copy do, and what stays local?
Each swatch's button copies its hex, and Copy palette copies all four as CSS custom properties, one per line. The clipboard is the only thing the page touches, and it needs a secure page; if the browser refuses, the status line says so. Nothing is saved or sent.
Is it accessible, and how does it look on a phone?
The tiles are decorative, and each one's caption says the same in words. The Toggle Group and the Slider are named, the slider reads its value as "64 pixels", the palette buttons are named for their colour and hex, and the status line is a polite live region that is present from the start. On a phone the tiles stack, the palette sits under the controls, and the header's button stays on the first screen.
Related
- Pro
Logo Lockups Gallery
Design assetsFour drawn logo lockups in framed cells with a Show clear space toggle that lays the margin over every lockup, and real SVG and PNG downloads under each.
- Pro
Theme Editor Settings
Appearance and localeA theme editor window: five colour tokens each with a picker, a hex field and a contrast ratio worked out from the hex values, a radius slider and a font select, a Light or Dark set with Dark derived until edited, a drawn sign-up page that wears the tokens and a Copy CSS button.
- Pro
Appearance Settings
Appearance and localeAn appearance settings panel that previews instead of applying: a drawn app window that wears the choices, theme and contrast cards with a drawn thumbnail each, a text-size slider with a sample sentence and a reduce motion switch with a replay.
- Pro
Brand Colour Picker Form
Numbers and pickersA brand colour field that makes a scale: a hex input and the colour picker kept in sync, eight named presets, and five derived steps by lightness, each with its hex and a copy button.
- Pro
Keyboard Shortcuts Settings
Appearance and localeA keyboard shortcuts editor: twelve editor actions in three groups with their keys in Kbd caps, a Change button that records the next combination, a conflict check with Replace or Cancel, Changed marks and Reset, a search and a PC or Mac choice for the key words.
- Pro
Language and Region Settings
Appearance and localeA language and region settings panel: two selects over three cells that show what they do, a sort order made by the language's collation, a month marked with the region's first weekday, and units with a worked example.