Skip to content
GitHub11 stars

A native scroll container with custom scrollbars.

Vernacular architecture is building done outside any academic tradition, and without professional guidance. It is not a particular architectural movement or style, but rather a broad category, encompassing a wide range and variety of building types, with differing methods of construction, from around the world, both historical and extant and classical and modern. Vernacular architecture constitutes 95% of the world's built environment, as estimated in 1995 by Amos Rapoport, as measured against the small percentage of new buildings every year designed by architects and built by engineers.

This type of architecture usually serves immediate, local needs, is constrained by the materials available in its particular region and reflects local traditions and cultural practices. The study of vernacular architecture does not examine formally schooled architects, but instead that of the design skills and tradition of local builders, who were rarely given any attribution for the work. More recently, vernacular architecture has been examined by designers and the building industry in an effort to be more energy conscious with contemporary design and construction—part of a broader interest in sustainable design.

<ScrollAreaRoot class="scroll-area">
    <ScrollAreaViewport class="scroll-area-viewport">
        <ScrollAreaContent class="scroll-area-content">

Anatomy

Import the primitives and assemble the parts:

@using Blazix.Primitives

<ScrollAreaRoot>
    <ScrollAreaViewport>
        <ScrollAreaContent />
    </ScrollAreaViewport>
    <ScrollAreaScrollbar>
        <ScrollAreaThumb />
    </ScrollAreaScrollbar>
    <ScrollAreaCorner />
</ScrollAreaRoot>

API Reference

ScrollAreaRoot

Renders a <div> element.

ParameterTypeDefault
OverflowEdgeThreshold int 0
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.

AttributeType
data-has-overflow-x

Present when the scroll area content is wider than the viewport.

-
data-has-overflow-y

Present when the scroll area content is taller than the viewport.

-
data-overflow-x-end

Present when there is overflow on the horizontal end side.

-
data-overflow-x-start

Present when there is overflow on the horizontal start side.

-
data-overflow-y-end

Present when there is overflow on the vertical end side.

-
data-overflow-y-start

Present when there is overflow on the vertical start side.

-
data-scrolling

Present when the user scrolls inside the scroll area.

-
CSS variableType
--scroll-area-corner-height

The scroll area's corner height.

number
--scroll-area-corner-width

The scroll area's corner width.

number

ScrollAreaContent

Renders a <div> element.

ParameterTypeDefault
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.

AttributeType
data-has-overflow-x

Present when the scroll area content is wider than the viewport.

-
data-has-overflow-y

Present when the scroll area content is taller than the viewport.

-
data-overflow-x-end

Present when there is overflow on the horizontal end side.

-
data-overflow-x-start

Present when there is overflow on the horizontal start side.

-
data-overflow-y-end

Present when there is overflow on the vertical end side.

-
data-overflow-y-start

Present when there is overflow on the vertical start side.

-
data-scrolling

Present when the user scrolls inside the scroll area.

-

ScrollAreaViewport

Renders a <div> element.

ParameterTypeDefault
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.

AttributeType
data-has-overflow-x

Present when the scroll area content is wider than the viewport.

-
data-has-overflow-y

Present when the scroll area content is taller than the viewport.

-
data-overflow-x-end

Present when there is overflow on the horizontal end side.

-
data-overflow-x-start

Present when there is overflow on the horizontal start side.

-
data-overflow-y-end

Present when there is overflow on the vertical end side.

-
data-overflow-y-start

Present when there is overflow on the vertical start side.

-
data-scrolling

Present when the user scrolls inside the scroll area.

-
CSS variableType
--scroll-area-overflow-x-end

The distance from the horizontal end edge in pixels.

number
--scroll-area-overflow-x-start

The distance from the horizontal start edge in pixels.

number
--scroll-area-overflow-y-end

The distance from the vertical end edge in pixels.

number
--scroll-area-overflow-y-start

The distance from the vertical start edge in pixels.

number

ScrollAreaThumb

Renders a <div> element.

ParameterTypeDefault
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.

AttributeType
data-orientation

Indicates the orientation of the scrollbar.

'horizontal' | 'vertical'
data-scrolling

Present when the user scrolls inside the scroll area.

-

ScrollAreaScrollbar

Renders a <div> element.

ParameterTypeDefault
Orientation

Which way the parts are laid out, and which arrow keys move between them.

Orientation Orientation.Vertical
KeepMounted bool false
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.

AttributeType
data-orientation

Indicates the orientation of the scrollbar.

'horizontal' | 'vertical'
data-has-overflow-x

Present when the scroll area content is wider than the viewport.

-
data-has-overflow-y

Present when the scroll area content is taller than the viewport.

-
data-hovering

Present when the pointer is over the scroll area.

-
data-overflow-x-end

Present when there is overflow on the horizontal end side.

-
data-overflow-x-start

Present when there is overflow on the horizontal start side.

-
data-overflow-y-end

Present when there is overflow on the vertical end side.

-
data-overflow-y-start

Present when there is overflow on the vertical start side.

-
data-scrolling

Present when the user scrolls inside the scroll area.

-
CSS variableType
--scroll-area-thumb-height

The scroll area thumb's height.

number
--scroll-area-thumb-width

The scroll area thumb's width.

number

ScrollAreaCorner

Renders a <div> element.

ParameterTypeDefault
Render RenderFragment<ScrollAreaRenderProps>? -
ChildContent

The part's content.

RenderFragment? -

Other attributes are passed to the element it renders.