Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
@gluestack-ui/pressable
Advanced tools
A universal headless Pressable component for React Native, Next.js & React
To use @gluestack-ui/pressable
, all you need to do is install the
@gluestack-ui/pressable
package:
$ yarn add @gluestack-ui/pressable
# or
$ npm i @gluestack-ui/pressable
By providing access to hover, pressed, and focus events, Pressable serves as a more flexible alternative to buttons at a lower level of abstraction. It is a useful primitive for advanced customization needs. Here's an example how to use this package to create one:
import Root from './Root';
import { createPressable } from '@gluestack-ui/pressable';
export const Pressable = createPressable({ Root });
Default styling of all these components can be found in the components/core/pressable file. For reference, you can view the source code of the styled Pressable
components.
// import the styles
import { Root } from '../components/core/pressable/styled-components';
// mapping the Pressable to root component
const Pressable = Root;
// using the Pressable component
export default () => (
<Pressable>
<Text />
</Pressable>
);
More guides on how to get started are available here.
FAQs
A universal headless Pressable component for React Native, Next.js & React
The npm package @gluestack-ui/pressable receives a total of 8,894 weekly downloads. As such, @gluestack-ui/pressable popularity was classified as popular.
We found that @gluestack-ui/pressable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.