Example Components

Working components that show how Bascik features fit together in real code. They are examples to read and learn from, not a component library: there is nothing to install or upgrade.

Every component works with several instances on one page, passes bascik --check and the linter, and is tested in a browser on every change. The files live in the examples/ folder of the Bascik repository, and these pages read them directly, so what you see here is the real source.

Components

ComponentShows
Site HeaderA skip link and navigation that marks the current page at build time, with a page-aware build script
Site FooterLinks and a copyright year from a build script that runs once for the whole site
Tab GroupTabs from slotted sections, arrow keys, runtime ARIA IDs that stay unique per instance
Modal DialogNative <dialog>, backdrop click, scroll lock with html:has()
Popover MenuA dropdown with no JavaScript, using popover and anchor positioning
Copy ButtonThe Clipboard API with an announced result, and a prop bound to an attribute
Filter ListLive filtering of slotted list items
Contact FormValidation, a JSON fetch, preserved field names, and the API route behind it
Theme ToggleLight and dark themes with no flash on load

See a Technique in Use

Other pages explain a feature; these components show it inside something complete.

To see thisReadIn this example
Per-instance IDs for scripts and ARIAScoped JavaScriptTab Group, Filter List
Reading slotted contentSlotsTab Group, Filter List
A prop in an attributePropsCopy Button
Design tokens with fallbacksScoped StylesEvery component
html:has() and anchor positioningScoped StylesModal Dialog, Popover Menu
Page-aware and once-per-site build scriptsPage-Aware ScriptsSite Header, Site Footer
Preserved field names and an API routePreserve Scoping, API RoutesContact Form
Light and dark themesThemingTheme Toggle

The previews on these pages sit on a plain page background with the starter site's design tokens, so each component looks as it does in a real site. Each component reads its colors from tokens with neutral fallbacks, so it also works in a project with no token stylesheet.

The repository also has a complete starter site that uses these components: shared layout components, per-page SEO tags, a Markdown blog with tags and a feed, llms.txt, a contact page, and a 404 page. The agent skills use the examples and the starter site as reference when an assistant builds a Bascik project.

Reading an Example

Each page shows the live component, how to use it, its full source, and a "How It Works" section that explains the scoping rules it relies on: find elements with getElementById, keep class names static, and derive runtime IDs from a scoped ID. Open the Source tab on any preview to see the component file.