BlueprintFrame
Frame an actual type or logo specimen with sparse alignment guides.
Default
Aa
Show code
Example.astroAstro
---
import BlueprintFrame from '@dhekode/ui/custom/BlueprintFrame.tsx';
---
<BlueprintFrame><p>Aa</p></BlueprintFrame>Content slot
Source Sans 3
Aa Bb Cc 0123456789
Show code
Example.astroAstro
---
import BlueprintFrame from '@dhekode/ui/custom/BlueprintFrame.tsx';
---
<BlueprintFrame><p>Source Sans 3</p><p>Aa Bb Cc 0123456789</p></BlueprintFrame>Custom class
Full-width specimen
Show code
Example.astroAstro
---
import BlueprintFrame from '@dhekode/ui/custom/BlueprintFrame.tsx';
---
<BlueprintFrame className="dk-demo-wide-frame"><p>Full-width specimen</p></BlueprintFrame>
<style>
:global(.dk-demo-wide-frame) { inline-size: 100%; }
</style>API reference
classType:
string | undefinedDefault:
unsetAdds a class to the component root; keep feature styling scoped.
Slots: Default: specimen content.
Use selectively. The guides are not evidence of original logo construction and are not a general card treatment.
Original component source
packages/ui/src/custom/BlueprintFrame.tsxAstro
import type { ReactNode } from 'react';
import { classNames } from '@dhekode/utils/class-names';
export interface BlueprintFrameProps {
className?: string | undefined;
children: ReactNode;
}
/**
* Decorative alignment guides around a real specimen: hairlines above and below, and vertical
* guides that overrun them slightly. Never a logo construction claim.
*/
export default function BlueprintFrame({ className, children }: BlueprintFrameProps) {
return (
<div
className={classNames(
'dk-blueprint relative w-fit max-w-full border-y-(length:--dk-border-width-hairline) border-solid border-surface-guide p-lg',
'before:pointer-events-none before:absolute before:-inset-y-xs before:start-0 before:w-(--dk-border-width-hairline) before:bg-surface-guide',
'after:pointer-events-none after:absolute after:-inset-y-xs after:end-0 after:w-(--dk-border-width-hairline) after:bg-surface-guide',
className,
)}
>
{children}
</div>
);
}Best practices
- Attach guides to a real specimen.
- Do not present alignment guides as measured logo construction.