Askr documentation
Generated API snapshot

@askrjs/themes/block

Exports from the declarations published in @askrjs/themes. Signatures reflect the published artifact.

Exports

This entrypoint publishes 21 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

Blocktype

Block: { (props: BlockNativeProps): JSX.Element; (props: BlockAsChildProps): JSX.Element; }

Low-level layout primitive: renders any element in {@link BlockElement } (default <div>) and turns layout-only props (spacing, alignment, direction, sizing, etc.) into a generated utility class. With asChild, the layout is merged onto a single child element instead of a wrapper.

BlockAligntype

BlockAlign: "start" | "end" | "center" | "stretch" | "baseline"

BlockAsChildPropstype

BlockAsChildProps: Omit<BlockOwnProps, "as"> & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<unknown>;
}

Props for {@link Block } rendered with asChild, merging layout onto a single child element.

align
align?: ResponsiveValue<BlockAlign> | undefined;
asChild
asChild: true;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children: JSXElement;
className
className?: string | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockBackgroundtype

BlockBackground: "surface" | "muted" | "selected" | "canvas" | "raised" | "overlay" | "transparent"

BlockDirectiontype

BlockDirection: "row" | "column" | "row-reverse" | "column-reverse"

BlockDivPropstype

BlockDivProps: BlockElementProps<"div">

{@link Block } props specialized for a <div> element.

align
align?: ResponsiveValue<BlockAlign> | undefined;
as
as?: "div" | undefined;
asChild
asChild?: false | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
className
className?: string | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockElementtype

BlockElement: "div" | "span" | "main" | "header" | "footer" | "section" | "aside" | "nav" | "a" | "ul" | "ol" | "li" | "form" | "article"

Element tags {@link Block } can render as via its as prop.

BlockElementPropstype

BlockElementProps: Omit<JSX.IntrinsicElements[TElement], "children" | "ref"> & BlockOwnProps & {
  as?: TElement;
  asChild?: false;
  ref?: Ref<unknown>;
}

{@link Block } props specialized for a given {@link BlockElement} tag TElement.

align
align?: ResponsiveValue<BlockAlign> | undefined;
as
as?: TElement | undefined;
asChild
asChild?: false | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockJustifytype

BlockJustify: "start" | "end" | "center" | "between"

BlockNativePropstype

BlockNativeProps: { [TElement in BlockElement]: BlockElementProps<TElement>; }[BlockElement]

Union of {@link BlockElementProps} across every {@link BlockElement}, used for {@link Block }'s native (non-asChild) overload.

align
align?: ResponsiveValue<BlockAlign> | undefined;
as
as?: "a" | "article" | "aside" | "div" | "form" | "footer" | "header" | "li" | "main" | "nav" | "ol" | "section" | "span" | "ul" | undefined;
asChild
asChild?: false | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
className
className?: string | ((() => IntrinsicClassValue) & string) | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockOwnPropstype

BlockOwnProps: BlockLayoutProps & {
  as?: BlockElement;
  children?: unknown;
  className?: string;
}

Layout and structural props accepted by {@link Block }, independent of the rendered element.

align
align?: ResponsiveValue<BlockAlign> | undefined;
as
as?: BlockElement | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
className
className?: string | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockPropstype

BlockProps: BlockNativeProps | BlockAsChildProps

Union of all prop shapes accepted by {@link Block }.

align
align?: ResponsiveValue<BlockAlign> | undefined;
asChild
asChild?: boolean | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
className
className?: string | ((() => IntrinsicClassValue) & string) | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockRadiustype

BlockRadius: true | "sm" | "md" | "lg" | "xl" | "round"

BlockRowFromtype

BlockRowFrom: Exclude<LayoutBreakpoint, "base">

BlockSizetype

BlockSize: "auto" | "full" | "screen" | "content" | "sidebar" | "page" | "sm" | "md" | "lg" | "xl"

BlockSpacetype

BlockSpace: "0" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "page"

BlockSpanPropstype

BlockSpanProps: BlockElementProps<"span">

{@link Block } props specialized for a <span> element.

align
align?: ResponsiveValue<BlockAlign> | undefined;
as
as?: "span" | undefined;
asChild
asChild?: false | undefined;
background
background?: ResponsiveValue<BlockBackground> | undefined;
border
border?: ResponsiveValue<boolean> | undefined;
borderBottom
borderBottom?: ResponsiveValue<boolean> | undefined;
borderRight
borderRight?: ResponsiveValue<boolean> | undefined;
borderTop
borderTop?: ResponsiveValue<boolean> | undefined;
center
center?: ResponsiveValue<boolean> | undefined;
children
children?: unknown;
className
className?: string | undefined;
direction
direction?: ResponsiveValue<BlockDirection> | undefined;
gap
gap?: ResponsiveValue<BlockSpace> | undefined;
grow
grow?: ResponsiveValue<number | boolean> | undefined;
height
height?: ResponsiveValue<BlockSize> | undefined;
hide
hide?: ResponsiveValue<boolean> | undefined;
justify
justify?: ResponsiveValue<BlockJustify> | undefined;
margin
margin?: ResponsiveValue<BlockMargin> | undefined;
marginX
marginX?: ResponsiveValue<BlockMargin> | undefined;
marginY
marginY?: ResponsiveValue<BlockMargin> | undefined;
maxHeight
maxHeight?: ResponsiveValue<BlockSize> | undefined;
maxWidth
maxWidth?: ResponsiveValue<BlockSize> | undefined;
minHeight
minHeight?: ResponsiveValue<BlockSize> | undefined;
minWidth
minWidth?: ResponsiveValue<BlockSize> | undefined;
padding
padding?: ResponsiveValue<BlockSpace> | undefined;
paddingX
paddingX?: ResponsiveValue<BlockSpace> | undefined;
paddingY
paddingY?: ResponsiveValue<BlockSpace> | undefined;
radius
radius?: ResponsiveValue<BlockRadius> | undefined;
ref
ref?: Ref<unknown>;
rowFrom
rowFrom?: BlockRowFrom | undefined;
shadow
shadow?: ResponsiveValue<BlockShadow> | undefined;
shrink
shrink?: ResponsiveValue<number | boolean> | undefined;
sticky
sticky?: boolean | undefined;
top
top?: ResponsiveValue<BlockSpace> | undefined;
width
width?: ResponsiveValue<BlockSize> | undefined;
wrap
wrap?: ResponsiveValue<boolean> | undefined;
zIndex
zIndex?: ResponsiveValue<BlockZIndex> | undefined;

BlockZIndextype

BlockZIndex: "header" | "sticky" | "fixed" | "dropdown" | "modal" | "popover" | "toast" | "tooltip"