/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-classnameslug-79f2cf24f0cc-classnameslug-s0702-c0000.md
`classNameSlug` - hono-docs
classNameSlug Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt classnameslug Summary By default, C...
classNameSlug
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#classnameslug
Summary
By default, CSS class names are generated in the format css-1234567890. You can customize this by passing a classNameSlug function. The function receives three arguments: - hash - the default generated class name (e.g. `css-1234567...
Content
By default, CSS class names are generated in the format css-1234567890. You can customize this by passing a classNameSlug function.
The function receives three arguments:
hash- the default generated class name (e.g.css-1234567890)label- extracted from a/* comment */at the start of the CSS template (empty string if none)css- the minified CSS string
const { css, Style } = createCssContext({
id: 'my-styles',
classNameSlug: (hash, label) => (label ? `h-${label}` : hash),
})
const heroClass = css`
/* hero-section */
background: blue;
`
// Generated class name: "h-hero-section"