LAYOUT / COMPONENT 35

Query container

React component

Create a named CSS container for responsive compositions.

Try it out

Use the live controls or open the Code tab to view and copy the example.

480px max

Collection overview

24 products

Available in the store

8 drafts

Ready to review

API reference

Generated from the package’s TypeScript exports. Standard React event and ARIA attributes are also accepted where the component wraps a native element.

PropTypeDescription
defaultCheckedboolean | undefinedStandard React / HTML attribute passed to the underlying element.
defaultValuestring | number | readonly string[] | undefinedInitial value for uncontrolled usage.
classNamestring | undefinedAdditional CSS class names.
idstring | undefinedStandard React / HTML attribute passed to the underlying element.
styleCSSProperties | undefinedInline styles, including CSS custom property overrides.
relstring | undefinedStandard React / HTML attribute passed to the underlying element.
childrenReactNodeContent rendered inside the component.
onFocusFocusEventHandler<HTMLDivElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onBlurFocusEventHandler<HTMLDivElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefinedStandard React / HTML attribute passed to the underlying element.
onErrorReactEventHandler<HTMLDivElement> | undefinedStandard React / HTML attribute passed to the underlying element.
onClickMouseEventHandler<HTMLDivElement> | undefinedStandard React / HTML attribute passed to the underlying element.
namestring | undefinedDefault: "staq"Field name used in form submission.

Accessibility & interaction

Preserve semantic structure and communicate meaning with text rather than color alone.

Visible focus, reduced motion, and both color themes are shared across staqui. Choose labels and document structure that make sense in your application; automated checks do not replace assistive-technology testing.

Variants & implementation notes

Native CSS container-type:inline-size and container-name. Write standard @container rules in the consuming application.

Use the typed API above for the supported variants. The example demonstrates the primary composition; shared controls inherit hover, focus, active and disabled treatment where applicable.