mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-19 00:18:18 +00:00
Migrate empty and item docs to Basecoat APIs
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
---
|
||||
layout: layouts/page.njk
|
||||
title: Customization
|
||||
description: Configure icons, themes, fonts, and style overrides.
|
||||
toc:
|
||||
- label: Icons
|
||||
id: icons
|
||||
- label: Theming
|
||||
id: theming
|
||||
- label: Fonts
|
||||
id: fonts
|
||||
- label: Style overrides
|
||||
id: style-overrides
|
||||
---
|
||||
|
||||
{% from "macros/code_block.njk" import code_block %}
|
||||
|
||||
<h2 id="icons"><a href="#icons">Icons</a></h2>
|
||||
|
||||
<div class="prose">
|
||||
<p>Basecoat uses <a href="https://lucide.dev" target="_blank">Lucide icons</a>. You have three options:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>Copy SVG code</b>: Visit <a href="https://lucide.dev/icons" target="_blank">lucide.dev/icons</a>, click any icon to copy the SVG, and paste it directly in your HTML. Best for simple projects or occasional icon usage.</li>
|
||||
<li><b>Install lucide</b>: Follow the <a href="https://lucide.dev/guide/installation" target="_blank">installation guide</a> to install the <code>lucide</code> package and dynamically render icons. Best for projects that need many icons or want tree-shaking.</li>
|
||||
<li><b>Use framework packages</b>: Browse <a href="https://lucide.dev/packages" target="_blank">framework-specific packages</a> (React, Vue, Angular, etc.) for component-based icon usage. Best if you're using a supported framework.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2 my-6">
|
||||
<a class="badge-outline" href="https://lucide.dev" target="_blank">
|
||||
Browse icons
|
||||
{% lucide "arrow-right" %}
|
||||
</a>
|
||||
<a class="badge-outline" href="https://lucide.dev/guide/installation" target="_blank">
|
||||
Installation guide
|
||||
{% lucide "arrow-right" %}
|
||||
</a>
|
||||
<a class="badge-outline" href="https://lucide.dev/packages" target="_blank">
|
||||
Packages
|
||||
{% lucide "arrow-right" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2 id="theming"><a href="#theming">Theming</a></h2>
|
||||
|
||||
<div class="prose">
|
||||
<p>You can import any <a href="https://shadcn-ui.com" target="_blank">shadcn/ui</a> compatible theme (e.g. <a href="https://tweakcn.com" target="_blank">tweakcn</a>). For example:</p>
|
||||
<ul>
|
||||
<li>Go to <a href="https://ui.shadcn.com/themes" target="_blank">ui.shadcn.com/themes</a> and select a theme.</li>
|
||||
<li>Click "Copy code" and save the theme variables in a file (e.g. <code>theme.css</code>).</li>
|
||||
<li>
|
||||
Import the theme in your CSS file:
|
||||
{% set code %}@import "tailwindcss";
|
||||
@import "basecoat-css/sera";
|
||||
@import "./theme.css";{% endset %}
|
||||
{{ code_block(code, "css") }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2 my-6">
|
||||
<a class="badge-outline" href="https://ui.shadcn.com/docs/theming" target="_blank">
|
||||
About shadcn/ui theming
|
||||
{% lucide "arrow-right" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2 id="fonts"><a href="#fonts">Fonts</a></h2>
|
||||
|
||||
<div class="prose">
|
||||
<p>Basecoat does not ship web fonts by default. The Basecoat docs site uses the same font choices as the current shadcn/ui site: <a href="https://fonts.google.com/specimen/Geist" target="_blank">Geist</a> for sans and heading text, and <a href="https://fonts.google.com/specimen/Geist+Mono" target="_blank">Geist Mono</a> for monospace text.</p>
|
||||
<p>To use the same setup, load the fonts and override the font tokens after importing Basecoat:</p>
|
||||
</div>
|
||||
|
||||
{% set code %}@import "tailwindcss";
|
||||
@import "basecoat-css/sera";
|
||||
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@400&display=swap");
|
||||
|
||||
:root {
|
||||
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
|
||||
--font-heading: "Geist", ui-sans-serif, system-ui, sans-serif;
|
||||
--font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
}{% endset %}
|
||||
{{ code_block(code, "css") }}
|
||||
|
||||
<div class="prose">
|
||||
<p>Keep font overrides in a small CSS file imported after Basecoat. This makes fonts a project-level customization instead of a Basecoat package default.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="style-overrides"><a href="#style-overrides">Style overrides</a></h2>
|
||||
|
||||
<div class="prose">
|
||||
<p>You can override default styles using Tailwind:</p>
|
||||
</div>
|
||||
|
||||
{% set code %}<button class="btn font-normal">Click me</button>{% endset %}
|
||||
{{ code_block(code, "html") }}
|
||||
|
||||
<div class="prose">
|
||||
<p>You can also extend or override the existing styles in your own Tailwind files:</p>
|
||||
</div>
|
||||
|
||||
{% set code %}@import "tailwindcss";
|
||||
@import "basecoat-css/sera";
|
||||
@import "./custom.css";{% endset %}
|
||||
{{ code_block(code, "css") }}
|
||||
|
||||
<div class="prose">
|
||||
<p>More importantly, you can use the <a href="#theming">theme variables</a> to customize many aspects of the components (colors, fonts, sizes, etc).</p>
|
||||
|
||||
<p><b>If you want to make more drastic changes</b>, you can <a href="https://github.com/hunvreus/basecoat/blob/main/src/css/basecoat.css" target="_blank">copy the <code>basecoat.css</code> file</a> into your project and make your changes there.</p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user