DESIGN.md Pro
Skip to article

How to Customize shadcn/ui and Tailwind for Your Product

Restyle a shadcn/ui screen in a controlled order, from shared colors and density to component variants, then check the result against real content.

Necati Ozmen3 min read

Changing a primary button from blue to orange can leave a dashboard feeling exactly the same. Open a page with actual records and inspect what takes up space. A sales pipeline with twelve opportunities calls for a different density from a checkout confirmation.

Start with one representative screen

Choose a page containing a heading, form field, action and table. Pick a visual reference from the DESIGN.md catalog. Identify three decisions to carry over, such as quieter borders, tighter table rows and a stronger difference between headings and labels.

Inspect how your repo defines foreground, background, border and radius. Change the shared values used by your installed components. Check the dialog and dropdown after each change, since a surface that works behind a card may disappear against an overlay.

Trace the style before changing it

Use the inspector on a pipeline cell and follow the padding back to its source. You might find spacing on the table cell, a second layer on a wrapper and a third on a badge. Reducing all three would leave little space around a focused action. Start with the layer that belongs to the table row.

For example, a Tailwind cell with px-6 py-4 can use px-3 py-2 in a dense variant. Leave the button inside it alone for the first pass. Put the old and new rows side by side with a two-line account name. A useful dense row shows more records while preserving the connection between the account, owner and next action.

Check the less photogenic parts of the dashboard

A screenshot with complete records hides several common problems. Clear the owner on one opportunity, remove the value from another and filter the table down to zero results. The empty state should explain how to recover. A missing owner should have a recognizable label. A missing forecast should remain distinguishable from zero revenue.

When the revised screen holds up, give it a stable place in the project as a reference page or component example. Document which contexts use dense rows. That lets another contributor reuse the same visual language without applying dashboard spacing to a customer-facing signup form.

Create a variant only when you need one

If dense rows belong only in the pipeline, put that behavior in the table or its variant. Reducing padding on every button can make unrelated forms harder to use. Keep focus rings and disabled states visible as you tune the palette.

Test with a long account name, an empty pipeline and a selected row. Then open a second page that shares the same components. If its layout has shifted unexpectedly, narrow the change to the pipeline before carrying it across the app.