ionic-team / ionic-team/ionic-framework

feat: Expose matchBreakpoint

Open
#21,257 1 comment 6 reactions 0 assignees View on GitHub
package: core type: feature request
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

# Feature Request

**Ionic version:**

[x] **5.1.0**

**Describe the Feature Request**

I'm new to Ionic, and AFAIK, there's no _clean_ way to access ionic breakpoints in js. We can hardcode something like `window.matchMedia("(min-width: someSMValue)").matches` but we have to maintain this value and make sure that our "sm" is the same "sm" used in ionic.

**Describe Preferred Solution**

I would be usefull if this file was in the public api: https://github.com/ionic-team/ionic/blob/master/core/src/utils/media.ts

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.